#include <bits/stdc++.h>
using namespace std;
char str[12][10] = {
    "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 x, y, z;
long double mx, t;
int pos;
void judge(int x) {
  if (fabs(mx - t) <= 1e-6)
    return;
  else if (mx < t) {
    pos = x;
    mx = t;
  }
}
int main() {
  cin >> x >> y >> z;
  pos = 0;
  mx = pow(y, z) * log(x);
  t = pow(z, y) * log(x);
  judge(1);
  t = z * log(pow(x, y));
  judge(2);
  t = y * log(pow(x, z));
  judge(3);
  t = pow(x, z) * log(y);
  judge(4);
  t = pow(z, x) * log(y);
  judge(5);
  t = z * log(pow(y, x));
  judge(6);
  t = x * log(pow(y, z));
  judge(7);
  t = pow(x, y) * log(z);
  judge(8);
  t = pow(y, x) * log(z);
  judge(9);
  t = y * log(pow(z, x));
  judge(10);
  t = x * log(pow(z, y));
  judge(11);
  printf("%s\n", str[pos]);
}
