#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
int n, ans;
long double x, y, z, mxm, val[15];
char str[][10] = {"",      "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() {
  cin >> x >> y >> z;
  val[1] = pow(y, z) * log(x);
  val[2] = pow(z, y) * log(x);
  val[3] = val[4] = log(x) * y * z;
  val[5] = pow(x, z) * log(y);
  val[6] = pow(z, x) * log(y);
  val[7] = val[8] = log(y) * x * z;
  val[9] = pow(x, y) * log(z);
  val[10] = pow(y, x) * log(z);
  val[11] = val[12] = log(z) * x * y;
  mxm = val[1];
  ans = 1;
  for (int i = 1; i <= 12; i++) {
    if (val[i] > mxm) {
      mxm = val[i];
      ans = i;
    }
  }
  cout << str[ans] << endl;
  return 0;
}
