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