#include <bits/stdc++.h>
using namespace std;
long double x, y, z, a[12];
int pos;
char print[][20] = {"x^y^z",   "x^z^y", "(x^y)^z", "",      "y^x^z",  "y^z^x",
                    "(y^x)^z", "",      "z^x^y",   "z^y^x", "(z^x)^y"};
int main() {
  cin >> x >> y >> z;
  a[0] = pow(y, z) * log(x);
  a[1] = pow(z, y) * log(x);
  a[2] = z * y * log(x);
  a[4] = pow(x, z) * log(y);
  a[5] = pow(z, x) * log(y);
  a[6] = z * x * log(y);
  a[8] = pow(x, y) * log(z);
  a[9] = pow(y, x) * log(z);
  a[10] = x * y * log(z);
  for (int i = 0; i < 11; ++i)
    if (strlen(print[i]) && a[pos] < a[i]) pos = i;
  puts(print[pos]);
}
