#include <bits/stdc++.h>
using namespace std;
const char *strs[] = {"x^y^z", "x^z^y", "(x^y)^z", "(x^y)^z",
                      "y^x^z", "y^z^x", "(y^x)^z", "(y^x)^z",
                      "z^x^y", "z^y^x", "(z^x)^y", "(z^x)^y"};
long double mylog(long double x) { return log(x); }
int main() {
  long double x, y, z;
  vector<long double> r(12);
  double inf = 1.0 / 0.0;
  double nan = 0.0 / 0.0;
  cin >> x >> y >> z;
  r[0] = z * mylog(y) + mylog(mylog(x));
  r[1] = y * mylog(z) + mylog(mylog(x));
  r[2] = r[3] = mylog(y * z * mylog(x));
  r[4] = z * mylog(x) + mylog(mylog(y));
  r[5] = x * mylog(z) + mylog(mylog(y));
  r[6] = r[7] = mylog(x * z * mylog(y));
  r[8] = y * mylog(x) + mylog(mylog(z));
  r[9] = x * mylog(y) + mylog(mylog(z));
  r[10] = r[11] = mylog(y * x * mylog(z));
  long double maxd = -inf;
  int mini = 0;
  for (int i = 0; i < 12; i++) {
    if (r[i] == nan) continue;
    if (r[i] > maxd) {
      maxd = r[i];
      mini = i;
    }
  }
  if (maxd > -inf) {
    cout << strs[mini];
    exit(0);
  }
  for (int i = 0; i < 12; i++)
    if (r[i] == -inf) {
      cout << strs[i];
      exit(0);
    }
  r[0] = pow(x, pow(y, z));
  r[1] = pow(x, pow(z, y));
  r[2] = r[3] = pow(x, y * z);
  r[4] = pow(y, pow(x, z));
  r[5] = pow(y, pow(z, x));
  r[6] = r[7] = pow(y, z * x);
  r[8] = pow(z, pow(x, y));
  r[9] = pow(z, pow(y, x));
  r[10] = r[11] = pow(z, y * x);
  for (int i = 0; i < 12; i++) {
    if (r[i] > maxd) {
      maxd = r[i];
      mini = i;
    }
  }
  cout << strs[mini];
}
