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
 z^x^y
 y^z^x
 (z^x)^y
 y^x^z
 (y^x)^z
 (z^x)^y
 (z^x)^y
 x^y^z
 (y^x)^z
 y^x^z
 x^y^z
 y^x^z
 (x^y)^z
 x^z^y
 x^y^z
 y^z^x
 (x^y)^z
 (x^y)^z
 y^z^x
 (x^y)^z
 x^z^y
 x^y^z
 x^y^z
 (z^x)^y
 x^y^z
 z^y^x
 y^x^z
 z^x^y
 (z^x)^y
 (z^x)^y
 x^z^y
 z^y^x
 x^y^z
 y^z^x
 x^z^y
 y^x^z
 x^z^y
 (z^x)^y
 z^y^x
 (z^x)^y
 (z^x)^y
 z^x^y
 y^z^x
 (y^x)^z
 (x^y)^z
 y^z^x
 x^y^z
 x^z^y
 y^x^z
 x^z^y
 y^x^z
 z^y^x
 z^x^y
 (y^x)^z
 z^y^x
 (x^y)^z
 y^z^x
 y^z^x
 (y^x)^z
 (x^y)^z
 y^x^z
 x^y^z
 y^x^z
 x^y^z
 x^y^z
 (y^x)^z
 x^y^z
 (x^y)^z
 (x^y)^z
 y^x^z
 y^x^z
 (y^x)^z
 z^y^x
 x^z^y
 (y^x)^z
 x^z^y
 (z^x)^y
 (x^y)^z
 (z^x)^y
 y^z^x
 x^y^z
 (x^y)^z
 z^x^y
 z^x^y
 z^y^x
 (x^y)^z
 z^x^y
 (x^y)^z
 (y^x)^z
 z^x^y
 (z^x)^y
 x^y^z
 (y^x)^z
 z^y^x
 (x^y)^z
 x^y^z
 x^z^y
 (z^x)^y
 z^x^y
 x^z^y
 x^z^y
 (y^x)^z
 (x^y)^z
 x^z^y
 (x^y)^z
 y^z^x
 z^y^x
 y^z^x
 x^z^y
 x^y^z
 x^y^z
 (x^y)^z
 y^x^z
 (x^y)^z
 (y^x)^z
 (x^y)^z
 x^z^y
 y^z^x
 y^z^x
 y^x^z
 x^z^y
 z^x^y
 x^z^y

#include <bits/stdc++.h>
using namespace std;
static const int MOD = 1000000007;
static const long long MODL = 1000000000000000003LL;
static const double eps = 1e-8;
template <class T>
inline T MIN(const T x, const T y) {
  return (x < y) ? x : y;
}
template <class T>
inline T MAX(const T x, const T y) {
  return (x > y) ? x : y;
}
template <class T>
inline void UPDMIN(T &x, const T y) {
  if (x > y) x = y;
}
template <class T>
inline void UPDMAX(T &x, const T y) {
  if (x < y) x = y;
}
template <class T>
inline int SIZE(const T &x) {
  return (int)x.size();
}
template <class T>
inline int LENGTH(const T &x) {
  return (int)x.length();
}
template <class T1, class T2>
inline pair<T1, T2> MP(const T1 &x, const T2 &y) {
  return make_pair(x, y);
}
inline int BINT(const int x) { return 1 << x; }
inline long long BLLD(const int x) { return 1LL << x; }
inline int BINT_TEST(const int s, const int x) { return (s & BINT(x)) != 0; }
inline int BLLD_TEST(const long long s, const int x) {
  return (s & BLLD(x)) != 0LL;
}
template <class T>
inline T LOWBIT(const T x) {
  return (x ^ (x - 1)) & x;
}
template <class T>
inline int BITCOUNT(const T x) {
  return (!x) ? x : (1 + BITCOUNT(x & (x - 1)));
}
const double PI = acos(-1.0);
const double EPS = 1e-5;
template <class T>
inline T SQR(const T x) {
  return x * x;
}
template <class T1, class T2>
inline T1 POW(const T1 x, const T2 y) {
  if (!y)
    return 1;
  else if ((y & 1) == 0) {
    return SQR(POW(x, y >> 1));
  } else
    return POW(x, y ^ 1) * x;
}
template <class T>
inline T GCD(const T x, const T y) {
  if (x < 0) return GCD(-x, y);
  if (y < 0) return GCD(x, -y);
  return (!y) ? x : GCD(y, x % y);
}
template <class T>
inline T LCM(const T x, const T y) {
  if (x < 0) return LCM(-x, y);
  if (y < 0) return LCM(x, -y);
  return x * (y / GCD(x, y));
}
template <class T>
inline T EEA(const T a, const T b, T &x, T &y) {
  if (a < 0) {
    T d = EEA(-a, b, x, y);
    x = -x;
    return d;
  }
  if (b < 0) {
    T d = EEA(a, -b, x, y);
    y = -y;
    return d;
  }
  if (!b) {
    x = 1;
    y = 0;
    return a;
  } else {
    T d = EEA(b, a % b, x, y);
    T t = x;
    x = y;
    y = t - (a / b) * y;
    return d;
  }
}
template <class T>
inline vector<pair<T, int> > FACTORIZE(T x) {
  vector<pair<T, int> > ret;
  if (x < 0) x = -x;
  for (T i = 2; x > 1;) {
    if (x % i == 0) {
      int count = 0;
      for (; x % i == 0; x /= i) count++;
      ret.push_back(MP(i, count));
    }
    i++;
    if (i > x / i) i = x;
  }
  return ret;
}
template <class T>
inline int ISPRIME(const T x) {
  if (x <= 1) return 0;
  for (T i = 2; SQR(i) <= x; i++)
    if (x % i == 0) return 0;
  return 1;
}
template <class T>
inline T EULARFUNCTION(T x) {
  vector<pair<T, int> > f = FACTORIZE(x);
  for (typename vector<pair<T, int> >::iterator it = f.begin(); it != f.end();
       it++) {
    x = x / it->first * (it->first - 1);
  }
  return x;
}
template <class T>
inline T INVERSEE(const T a, const T b = MOD) {
  T x, y;
  EEA(a, b, x, y);
  return x ? x : 1;
}
template <class T>
inline T MOD_STD(const T x, const T m = MOD) {
  return (x % m + m) % m;
}
template <class T>
inline void MOD_STD(T *x, const T m = MOD) {
  *x = (*x % m + m) % m;
}
template <class T>
inline T MOD_ADD(const T x, const T y, const T m = MOD) {
  return (x + y) % m;
}
template <class T>
inline void MOD_ADD(T *x, const T y, const T m = MOD) {
  *x = (*x + y) % m;
}
template <class T>
inline T MOD_MUL(const T x, const T y, const T m = MOD) {
  return (T)((1LL * x * y) % m);
}
template <class T>
inline void MOD_MUL(T *x, const T y, const T m = MOD) {
  *x = (T)((1LL * (*x) * y) % m);
}
template <class T1, class T2>
inline T1 MOD_POW(const T1 x, const T2 y, const T1 m = MOD) {
  if (y == 0)
    return 1 % m;
  else if ((y & 1) == 0) {
    T1 z = MOD_POW(x, y >> 1, m);
    return MOD_MUL(z, z, m);
  } else
    return MOD_MUL(MOD_POW(x, y ^ 1, m), x, m);
}
inline long long MODL_MUL(long long x, long long y, const long long m = MOD) {
  if (x < y) swap(x, y);
  long long z = 0LL;
  while (y > 0) {
    if (y & 1) {
      MOD_ADD(&z, x, m);
    }
    MOD_ADD(&x, x, m);
    y >>= 1;
  }
  return z;
}
inline long long MODL_POW(const long long x, const long long y,
                          const long long m = MOD) {
  if (y == 0LL)
    return 1LL % m;
  else if ((y & 1) == 0LL) {
    long long z = MODL_POW(x, y >> 1, m);
    return MODL_MUL(z, z, m);
  } else
    return MODL_MUL(MODL_POW(x, y ^ 1, m), x, m);
}
template <class T>
class MATX {
 private:
  unsigned long hig, wid;
  T *data;
  void __init() {
    this->data = (T *)malloc(sizeof(T) * this->hig * this->wid);
    memset(this->data, 0, sizeof(T) * this->hig * this->wid);
  }

 public:
  MATX() {
    this->hig = this->wid = 1;
    __init();
  }
  MATX(const unsigned long _len) {
    this->hig = this->wid = _len;
    __init();
  }
  MATX(const unsigned long _hig, const unsigned long _wid) {
    this->hig = _hig;
    this->wid = _wid;
    __init();
  }
  MATX(const MATX &rhs) {
    this->hig = rhs.hig;
    this->wid = rhs.wid;
    this->data = (T *)malloc(sizeof(T) * this->hig * this->wid);
    for (unsigned long x = 0; x < this->hig; x++)
      for (unsigned long y = 0; y < this->wid; y++)
        this->data[x * this->wid + y] = rhs.at(x, y);
  }
  ~MATX() { free(this->data); }
  T &operator()(const unsigned long x, const unsigned long y) {
    if (x >= this->hig || y >= this->wid) return (*(T *)NULL);
    return this->data[x * wid + y];
  }
  MATX &operator=(const MATX &rhs) {
    if (this->hig != rhs.hig || this->wid != rhs.wid) {
      free(this->data);
      this->hig = rhs.hig;
      this->wid = rhs.wid;
      this->data = (T *)malloc(sizeof(T) * this->hig * this->wid);
    }
    for (unsigned long x = 0; x < this->hig; x++)
      for (unsigned long y = 0; y < this->wid; y++)
        this->data[x * this->wid + y] = rhs.at(x, y);
    return *this;
  }
  const MATX operator+(const MATX &opn) const {
    MATX ret(*this);
    for (unsigned long x = 0; x < ret.hig; x++)
      for (unsigned long y = 0; y < ret.wid; y++)
        ret.data[x * ret.wid + y] += opn.at(x, y);
    return ret;
  }
  const MATX operator-(const MATX &opn) const {
    MATX ret(*this);
    for (unsigned long x = 0; x < ret.hig; x++)
      for (unsigned long y = 0; y < ret.wid; y++)
        ret.data[x * ret.wid + y] -= opn.at(x, y);
    return ret;
  }
  const MATX operator*(const MATX &opn) const {
    MATX ret(this->hig, opn.wid);
    const unsigned long len = MIN(this->wid, opn.hig);
    for (unsigned long x = 0; x < ret.hig; x++)
      for (unsigned long y = 0; y < ret.wid; y++)
        for (unsigned long z = 0; z < len; z++)
          ret.data[x * ret.wid + y] += this->at(x, z) * opn.at(z, y);
    return ret;
  }
  const MATX mul(const MATX &opn) const { return *this * opn; }
  template <class T2>
  const MATX mul(const MATX &opn, const T2 m) const {
    MATX ret(this->hig, opn.wid);
    const unsigned long len = MIN(this->wid, opn.wid);
    for (unsigned long x = 0; x < ret.hig; x++)
      for (unsigned long y = 0; y < ret.wid; y++)
        for (unsigned long z = 0; z < len; z++)
          MOD_ADD(&ret.data[x * ret.wid + y],
                  MOD_MUL(this->at(x, z), opn.at(z, y), m), m);
    return ret;
  }
  MATX &operator+=(const MATX &rhs) {
    *this = *this + rhs;
    return *this;
  }
  MATX &operator-=(const MATX &rhs) {
    *this = *this - rhs;
    return *this;
  }
  MATX &operator*=(const MATX &rhs) {
    *this = *this * rhs;
    return *this;
  }
  const MATX pow(const unsigned long p) const {
    MATX buff(*this), ret(this->hig, this->wid);
    ret.set_one();
    if (p > 0)
      for (unsigned long i = 1;; i <<= 1) {
        if (p & i) ret *= buff;
        buff *= buff;
        if (i > (p >> 1)) break;
      }
    return ret;
  }
  template <class T2>
  const MATX pow(const unsigned long p, const T2 m) const {
    MATX buff(*this), ret(this->hig, this->wid);
    ret.set_one();
    if (p > 0)
      for (unsigned long i = 1;; i <<= 1) {
        if (p & i) ret = ret.mul(buff, m);
        buff = buff.mul(buff, m);
        if (i > (p >> 1)) break;
      }
    return ret;
  }
  const T at(const unsigned long x, const unsigned long y) const {
    if (x >= this->hig || y >= this->wid) return 0;
    return this->data[x * wid + y];
  }
  void show() const {
    for (unsigned long x = 0; x < this->hig; x++) {
      for (unsigned long y = 0; y < this->wid; y++)
        cout << this->at(x, y) << " ";
      cout << endl;
    }
  }
  void set_one() {
    for (unsigned long x = 0; x < this->hig; x++)
      for (unsigned long y = 0; y < this->wid; y++)
        this->data[x * this->wid + y] = (x == y) ? 1 : 0;
  }
};
template <class T>
class Complex {
 public:
  T r, i;
  Complex(T x = 0.0, T y = 0.0) {
    this->r = x;
    this->i = y;
  }
  Complex operator+(const Complex &opn) const {
    return Complex(this->r + opn.r, this->i + opn.i);
  }
  Complex operator-(const Complex &opn) const {
    return Complex(this->r - opn.r, this->i - opn.i);
  }
  Complex operator*(const Complex &opn) const {
    return Complex(this->r * opn.r - this->i * opn.i,
                   this->r * opn.i + this->i * opn.r);
  }
};
class MILLERRABIN {
 private:
  static const int prime_table[12];
  int witness(long long a, long long d, long long s, long long n) {
    long long r = MODL_POW(a, d, n);
    if (r == 1 || r == n - 1) return 0;
    for (int i = 0; i < s - 1; i++) {
      r = MODL_MUL(r, r, n);
      if (r == 1) return 1;
      if (r == n - 1) return 0;
    }
    return 1;
  }

 public:
  int test(const long long n) {
    if (n <= 2LL) return 0;
    long long p = n - 1LL, s = 0LL;
    while (!(p & 1)) {
      p >>= 1;
      s++;
    }
    for (int i = 0; i < 12 && this->prime_table[i] < n; i++) {
      if (witness(this->prime_table[i], p, s, n)) return 0;
    }
    return 1;
  }
};
const int MILLERRABIN::prime_table[12] = {2,  3,  5,  7,  11, 13,
                                          17, 19, 23, 29, 31, 37};
template <class T>
inline int fsign(const T x) {
  if (x > -eps && x < eps) return 0;
  return (x < 0.0) ? -1 : 1;
}
template <class T>
class point_t {
 public:
  T x, y;
  point_t() {
    this->x = 0.0;
    this->y = 0.0;
  }
  point_t(const T _x, const T _y) {
    this->x = _x;
    this->y = _y;
  }
  point_t operator-(const point_t &rhs) const {
    return point_t(this->x - rhs.x, this->y - rhs.y);
  }
  T operator^(const point_t &rhs) const {
    return this->x * rhs.y - this->y * rhs.x;
  }
  T operator*(const point_t &rhs) const {
    return this->x * rhs.x + this->y * rhs.y;
  }
  T cross(const point_t &p, const point_t &q) const {
    return (p - *this) ^ (q - *this);
  }
  void rotate(double radian) {
    T x0 = x, y0 = y;
    T sinr = sin(radian);
    T cosr = cos(radian);
    x = x0 * cosr - y0 * sinr;
    y = x0 * sinr + y0 * cosr;
  }
  T dist2(const point_t &lhs, const point_t &rhs) const {
    return (lhs - rhs) * (lhs - rhs);
  }
  T dist2(const point_t &rhs) const { return (*this - rhs) * (*this - rhs); }
  T dist(const point_t &lhs, const point_t &rhs) const {
    return sqrt((lhs - rhs) * (lhs - rhs));
  }
  T dist(const point_t &rhs) const {
    return sqrt((*this - rhs) * (*this - rhs));
  }
};
template <class T>
class segment_t {
 public:
  point_t<T> p, q;
  segment_t() {
    this->p.x = this->p.y = 0.0;
    this->q.x = this->q.y = 0.0;
  }
  template <class T2>
  segment_t(const point_t<T2> &_p, const point_t<T2> &_q) {
    this->p.x = _p.x;
    this->p.y = _p.y;
    this->q.x = _q.x;
    this->q.y = _q.y;
  }
  segment_t(const T px, const T py, const T qx, const T qy) {
    this->p.x = px;
    this->p.y = py;
    this->q.x = qx;
    this->q.y = qy;
  }
  T length() const { return this->p.dist(this->q); }
  T length2() const { return this->p.dist2(this->q); }
  int contain(const point_t<T> &pnt, const int ignore_endpoint = 0) const {
    if (ignore_endpoint) {
      return fsign((this->p - pnt) ^ (this->q - pnt)) == 0 &&
             fsign((pnt.x - this->p.x) * (pnt.x - this->q.x)) < 0 &&
             fsign((pnt.y - this->p.y) * (pnt.y - this->q.y)) < 0;
    } else {
      return fsign((this->p - pnt) ^ (this->q - pnt)) == 0 &&
             fsign((pnt.x - this->p.x) * (pnt.x - this->q.x)) <= 0 &&
             fsign((pnt.y - this->p.y) * (pnt.y - this->q.y)) <= 0;
    }
  }
  int intersection(const segment_t &sa, const segment_t &sb,
                   const int ignore_endpoint = 0) const {
    if (!ignore_endpoint) {
      if (sa.contain(sb.p) || sa.contain(sb.q) || sb.contain(sa.p) ||
          sb.contain(sa.q))
        return 1;
    }
    return fsign(sa.p.cross(sa.q, sb.p)) * fsign(sa.p.cross(sa.q, sb.q)) < 0 &&
           fsign(sb.p.cross(sb.q, sa.p)) * fsign(sb.p.cross(sb.q, sa.q)) < 0;
  }
  int intersection(const segment_t &rhs, const int ignore_endpoint = 0) const {
    return this->intersection(*this, rhs, ignore_endpoint);
  }
};
static const int pos0[6] = {0, 1, 4, 5, 8, 9};
static const int pos1[6] = {2, 3, 6, 7, 10, 11};
static const char res[12][12] = {"x^y^z", "x^z^y", "(x^y)^z", "(x^z)^y",
                                 "y^x^z", "y^z^x", "(y^x)^z", "(y^z)^x",
                                 "z^x^y", "z^y^x", "(z^x)^y", "(z^y)^x"};
double a[3], bst_val;
int c[3], bst_pos;
inline double type0(const double x, const double y, const double z) {
  return log(y) * z + log(log(x));
}
inline double type1(const double x, const double y, const double z) {
  return log(y * z) + log(log(x));
}
void mainasu_entry() {
  for (int i = 0; i < 3; i++) c[i] = i;
  int cnt = 0;
  bst_val = 1e23;
  do {
    double buf;
    if (a[c[0]] < 1.0 - eps) {
      buf = type0(1.0 / a[c[0]], a[c[1]], a[c[2]]);
      if (buf < bst_val - eps ||
          (!fsign(buf - bst_val) && pos0[cnt] < bst_pos)) {
        bst_val = buf;
        bst_pos = pos0[cnt];
      }
      buf = type1(1.0 / a[c[0]], a[c[1]], a[c[2]]);
      if (buf < bst_val - eps ||
          (!fsign(buf - bst_val) && pos1[cnt] < bst_pos)) {
        bst_val = buf;
        bst_pos = pos1[cnt];
      }
    } else if (bst_val > -1e23 + eps) {
      bst_val = -1e23 + eps;
      bst_pos = pos0[cnt];
    }
    cnt++;
  } while (next_permutation(c, c + 3));
}
void tsuika_entry() {
  for (int i = 0; i < 3; i++) c[i] = i;
  int cnt = 0;
  bst_val = -1e23;
  bst_pos = -1;
  do {
    double buf;
    if (a[c[0]] > 1.0 + eps) {
      buf = type0(a[c[0]], a[c[1]], a[c[2]]);
      if (buf > bst_val + eps ||
          (!fsign(buf - bst_val) && pos0[cnt] < bst_pos)) {
        bst_val = buf;
        bst_pos = pos0[cnt];
      }
      buf = type1(a[c[0]], a[c[1]], a[c[2]]);
      if (buf > bst_val + eps ||
          (!fsign(buf - bst_val) && pos1[cnt] < bst_pos)) {
        bst_val = buf;
        bst_pos = pos1[cnt];
      }
    }
    cnt++;
  } while (next_permutation(c, c + 3));
}
int main() {
  ios::sync_with_stdio(false);
  while (cin >> a[0] >> a[1] >> a[2]) {
    if (a[0] < 1.0 + eps && a[1] < 1.0 + eps && a[2] < 1.0 + eps) {
      mainasu_entry();
    } else {
      tsuika_entry();
    }
    cout << res[bst_pos] << endl;
  }
  return 0;
}
