#include <bits/stdc++.h>
using namespace std;
const int N = int(3e5);
double xx, yy, zz;
long double x, y, z, a[15], mn;
int pos;
string second[12] = {"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 >> xx >> yy >> zz;
  x = xx;
  y = yy;
  z = zz;
  long double logx = log(x), logy = log(y), logz = log(z);
  a[1] = logx * pow(y, z);
  a[2] = logx * pow(z, y);
  a[3] = logx * y * z;
  a[4] = a[3];
  a[5] = logy * pow(x, z);
  a[6] = logy * pow(z, x);
  a[7] = logy * x * z;
  a[8] = a[7];
  a[9] = logz * pow(x, y);
  a[10] = logz * pow(y, x);
  a[11] = logz * x * y;
  a[12] = a[11];
  mn = a[1], pos = 0;
  for (int i = 2; i <= 12; i++) {
    if (mn < a[i]) {
      mn = a[i];
      pos = i - 1;
    }
  }
  cout << second[pos];
  return 0;
}
