#include <bits/stdc++.h>
using namespace std;
char* r[] = {"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(int argc, char* argv[]) {
  long double co[3];
  cin >> co[0] >> co[1] >> co[2];
  long double mxx = -1e200;
  unsigned int ix = 0;
  bool found = false;
  for (unsigned int i = 0; i < 3; ++i) {
    if (co[0] >= 1.) {
      found = true;
      long double cl = (fabs(1. - co[0]) <= 1E-11) ? -1e100 : logl(logl(co[0])),
                  lg[2];
      lg[0] = logl(co[1]);
      lg[1] = logl(co[2]);
      long double fc[3];
      fc[0] = co[2] * lg[0];
      fc[1] = co[1] * lg[1];
      fc[2] = lg[0] + lg[1];
      long double mx = max(fc[0], max(fc[1], fc[2]));
      unsigned int cx = 0;
      if (mx == fc[0])
        cx = 0;
      else if (mx == fc[1])
        cx = 1;
      else
        cx = 2;
      long double cr = fc[cx] + cl;
      if (cr > mxx) {
        mxx = cr;
        ix = (3 * i) + cx;
      }
    }
    if (i == 0)
      swap(co[0], co[1]);
    else if (i == 1)
      swap(co[0], co[2]);
  }
  if (!found) {
    swap(co[0], co[1]);
    swap(co[1], co[2]);
    for (unsigned int i = 0; i < 3; ++i) {
      long double fc[3];
      fc[0] = powl(co[0], powl(co[1], co[2]));
      fc[1] = powl(co[0], powl(co[2], co[1]));
      fc[2] = powl(co[0], co[1] * co[2]);
      long double mx = max(fc[0], max(fc[1], fc[2]));
      unsigned int cx = 0;
      if (mx == fc[0])
        cx = 0;
      else if (mx == fc[1])
        cx = 1;
      else
        cx = 2;
      if (fc[cx] > mxx) {
        mxx = fc[cx];
        ix = (3 * i) + cx;
      }
      if (i == 0)
        swap(co[0], co[1]);
      else if (i == 1)
        swap(co[0], co[2]);
    }
  }
  cout << r[ix] << endl;
  return 0;
}
