#include <bits/stdc++.h>
using namespace std;
string v[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"};
pair<long double, long double> sol[12];
const long double EPS = 1e-12;
long double cmp(pair<long double, long double> a,
                pair<long double, long double> b) {
  long double res1, res2;
  res1 = a.second * log(a.first);
  res2 = b.second * log(b.first);
  if (abs(res1 - res2) < EPS) return 0;
  return res1 - res2;
}
int main() {
  int i, pos;
  long double x, y, z;
  cin >> x >> y >> z;
  sol[0] = {x, pow(y, z)};
  sol[1] = {x, pow(z, y)};
  sol[2] = {x, y * z};
  sol[3] = {x, z * y};
  sol[4] = {y, pow(x, z)};
  sol[5] = {y, pow(z, x)};
  sol[6] = {y, x * z};
  sol[6] = {y, z * x};
  sol[8] = {z, pow(x, y)};
  sol[9] = {z, pow(y, x)};
  sol[10] = {z, x * y};
  sol[11] = {z, y * x};
  pos = 0;
  for (i = 1; i < 12; ++i) {
    if (cmp(sol[pos], sol[i]) < 0) pos = i;
  }
  cout << v[pos];
  return 0;
}
