#include <bits/stdc++.h>
using namespace std;
long double values[12];
vector<string> expression = {"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() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long double x, y, z, a, b, c;
  cin >> x >> y >> z;
  a = (log(x));
  b = (log(y));
  c = (log(z));
  values[0] = pow(y, z) * a;
  values[1] = pow(z, y) * a;
  values[2] = (z * y) * a;
  values[3] = values[2];
  values[4] = pow(x, z) * b;
  values[5] = pow(z, x) * b;
  values[6] = (z * x) * b;
  values[7] = values[6];
  values[8] = pow(x, y) * c;
  values[9] = pow(y, x) * c;
  values[10] = (x * y) * c;
  values[11] = values[10];
  int idx = 0;
  long double ans = values[0];
  for (int i = 1; i < 12; i++) {
    if (values[i] > ans) {
      ans = values[i];
      idx = i;
    }
  }
  cout << expression[idx] << endl;
  return 0;
}
