#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[13][15] = {{" "},       {"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"}};
  long double a[15];
  long double x, y, z;
  cin >> x >> y >> z;
  a[1] = pow(y, z) * log(x);
  a[2] = pow(z, y) * log(x);
  a[3] = z * y * log(x);
  a[4] = y * z * log(x);
  a[5] = pow(x, z) * log(y);
  a[6] = pow(z, x) * log(y);
  a[7] = z * x * log(y);
  a[8] = x * z * log(y);
  a[9] = pow(x, y) * log(z);
  a[10] = pow(y, x) * log(z);
  a[11] = x * y * log(z);
  a[12] = x * y * log(z);
  long double ma = -1000000;
  int pos = 0;
  for (int i = 1; i <= 12; i++) {
    if (a[i] > ma) {
      ma = a[i];
      pos = i;
    }
  }
  cout << s[pos] << endl;
}
