#include <bits/stdc++.h>
using namespace std;
string s[50] = {"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"};
int main() {
  long double x, y, z, a[12], max = 0;
  int res;
  cin >> x >> y >> z;
  a[0] = pow(y, z) * log(x);
  a[1] = pow(z, y) * log(x);
  a[2] = a[3] = z * y * log(x);
  a[4] = pow(x, z) * log(y);
  a[5] = pow(z, x) * log(y);
  a[6] = a[7] = z * x * log(y);
  a[8] = pow(x, y) * log(z);
  a[9] = pow(y, x) * log(z);
  a[10] = a[11] = x * y * log(z);
  max = a[0];
  res = 0;
  for (int i = 1; i <= 11; ++i) {
    if (max < a[i]) {
      max = a[i];
      res = i;
    }
  }
  cout << s[res] << endl;
}
