#include <bits/stdc++.h>
using namespace std;
long double eps = -1e12;
inline bool eq(const long double &x, const long double &y) {
  return abs(x - y) < eps || abs(x - y) < eps * abs(x);
}
int main() {
  long double x, y, z;
  cin >> x >> y >> z;
  string expression[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"};
  vector<long double> ans(12, 0);
  long double res = -1000;
  long double logx = log(x);
  long double logy = log(y);
  long double logz = log(z);
  ans[0] = pow(y, z) * logx;
  ans[1] = pow(z, y) * logx;
  ans[2] = logx * y * z;
  ans[3] = ans[2];
  ans[4] = pow(x, z) * logy;
  ans[5] = pow(z, x) * logy;
  ans[6] = logy * x * z;
  ans[7] = ans[6];
  ans[8] = pow(x, y) * logz;
  ans[9] = pow(y, x) * logz;
  ans[10] = logz * y * x;
  ans[11] = ans[10];
  int index = 0;
  for (int i = 0; i < 12; ++i) {
    if (ans[i] > res && !eq(ans[i], res)) {
      res = ans[i];
      index = i;
    }
  }
  cout << expression[index] << endl;
  return 0;
}
