#include <bits/stdc++.h>
const long double EPS = 1e-12;
using namespace std;
inline long long rit() {
  long long f = 0, key = 1;
  char c;
  do {
    c = getchar();
    if (c == '-') key = -1;
  } while (c < '0' || c > '9');
  do {
    f = f * 10 + c - '0';
    c = getchar();
  } while (c >= '0' && c <= '9');
  return f * key;
}
string op[12];
void init() {
  op[0] = "x^y^z";
  op[1] = "x^z^y";
  op[2] = "(x^y)^z";
  op[3] = "(x^z)^y";
  op[4] = "y^x^z";
  op[5] = "y^z^x";
  op[6] = "(y^x)^z";
  op[7] = "(y^z)^x";
  op[8] = "z^x^y";
  op[9] = "z^y^x";
  op[10] = "(z^x)^y";
  op[11] = "(z^y)^x";
}
inline long double chk(long double a, long double b, long double c) {
  return log(a) * pow(b, c);
}
inline long double c2(long double a, long double b, long double c) {
  return log(a) * b * c;
}
int eq(const long double &x, const long double &y) {
  return abs(x - y) < EPS || abs(x - y) < EPS * abs(x);
}
long double ans[12], a, b, c;
void read() {
  double fa, fb, fc;
  scanf("%lf%lf%lf", &fa, &fb, &fc);
  a = fa, b = fb, c = fc;
}
void solve() {
  int key, i;
  long double val;
  ans[0] = chk(a, b, c);
  ans[1] = chk(a, c, b);
  ans[2] = c2(a, b, c);
  ans[3] = c2(a, c, b);
  ans[4] = chk(b, a, c);
  ans[5] = chk(b, c, a);
  ans[6] = c2(b, a, c);
  ans[7] = c2(b, c, a);
  ans[8] = chk(c, a, b);
  ans[9] = chk(c, b, a);
  ans[10] = c2(c, a, b);
  ans[11] = c2(c, b, a);
  key = 0;
  val = ans[0];
  for (i = 1; i < 12; i++) {
    if ((!eq(val, ans[i])) && ans[i] > val) {
      val = ans[i];
      key = i;
    }
  }
  cout << op[key] << endl;
}
int main() {
  int nn = 1;
  init();
  while (nn--) {
    read();
    solve();
  }
  return 0;
}
