#include <bits/stdc++.h>
char *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"};
double sx, sy, sz;
long double x, y, z;
std::vector<long double> a;
int main() {
  scanf("%lf%lf%lf", &sx, &sy, &sz);
  x = sx;
  y = sy;
  z = sz;
  a = {logl(x) * powl(y, z), logl(x) * powl(z, y), logl(x) * y * z,
       logl(y) * powl(x, z), logl(y) * powl(z, x), logl(y) * x * z,
       logl(z) * powl(x, y), logl(z) * powl(y, x), logl(z) * x * y};
  printf("%s\n", s[max_element(a.begin(), a.end()) - a.begin()]);
  return 0;
}
