#include <bits/stdc++.h>
using namespace std;
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() {
  long double a[12];
  long double x, y, z;
  while (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);
    int pos = 0;
    for (int i = 1; i < 12; i++)
      if (a[i] > a[pos]) pos = i;
    printf("%s\n", s[pos]);
  }
  return 0;
}
