#include <bits/stdc++.h>
const int N = 2e3 + 5;
int TEST_NUM = 1;
using namespace std;
void calc(string *res, long double *d, long double x, long double y,
          long double z) {
  res[1] = "x^y^z";
  d[1] = log(x) * pow(y, z);
  res[2] = "x^z^y";
  d[2] = log(x) * pow(z, y);
  res[3] = "(x^y)^z";
  d[3] = log(x) * y * z;
  res[4] = "(x^z)^y";
  d[4] = log(x) * y * z;
  res[5] = "y^x^z";
  d[5] = log(y) * pow(x, z);
  res[6] = "y^z^x";
  d[6] = log(y) * pow(z, x);
  res[7] = "(y^x)^z";
  d[7] = log(y) * x * z;
  res[8] = "(y^z)^x";
  d[8] = log(y) * x * z;
  res[9] = "z^x^y";
  d[9] = log(z) * pow(x, y);
  res[10] = "z^y^x";
  d[10] = log(z) * pow(y, x);
  res[11] = "(z^x)^y";
  d[11] = log(z) * x * y;
  res[12] = "(z^y)^x";
  d[12] = log(z) * x * y;
}
int main() {
  long double x, y, z;
  string res[15];
  long double d[15];
  cin >> x >> y >> z;
  calc(res, d, x, y, z);
  int mxi = -1;
  for (int i = 1; i <= 12; i++) {
    if (mxi == -1 || d[mxi] < d[i]) {
      mxi = i;
    }
  }
  cout << res[mxi] << endl;
  return 0;
}
