#include <bits/stdc++.h>
using namespace std;
long double x, y, z;
long double arr[9];
string s[9] = {"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(void) {
  cin >> x >> y >> z;
  arr[0] = pow(y, z) * log(x);
  arr[1] = pow(z, y) * log(x);
  arr[2] = y * z * log(x);
  arr[3] = pow(x, z) * log(y);
  arr[4] = pow(z, x) * log(y);
  arr[5] = x * z * log(y);
  arr[6] = pow(x, y) * log(z);
  arr[7] = pow(y, x) * log(z);
  arr[8] = x * y * log(z);
  int ind = 0;
  for (int i = 0; i < 9; i++) {
    if (arr[i] > arr[ind]) ind = i;
  }
  cout << s[ind] << "\n";
  return 0;
}
