#include <bits/stdc++.h>
using namespace std;
const double eps = 1.0e-12;
string s[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",
};
struct data {
  int type;
  long double real;
  long double imag;
  bool operator<(const data& rhs) const {
    if (type == 1 && rhs.type == 1) {
      return real + eps < rhs.real;
    }
    return imag + eps < rhs.imag;
  }
} a[12];
int main() {
  long double x, y, z;
  cin >> x >> y >> z;
  for (int i = 0; i < 12; i++) {
    a[i].type = 0;
  }
  a[0].imag = powl(y, z) * logl(x);
  a[1].imag = powl(z, y) * logl(x);
  a[2].imag = y * z * logl(x);
  a[3].imag = z * y * logl(x);
  a[4].imag = powl(x, z) * logl(y);
  a[5].imag = powl(z, x) * logl(y);
  a[6].imag = x * z * logl(y);
  a[7].imag = z * x * logl(y);
  a[8].imag = powl(x, y) * logl(z);
  a[9].imag = powl(y, x) * logl(z);
  a[10].imag = y * x * logl(z);
  a[11].imag = x * y * logl(z);
  if (logl(x) > 0) {
    for (int i = 0; i < 4; i++) {
      a[i].type = 1;
    }
    a[0].real = z * logl(y) + logl(logl(x));
    a[1].real = y * logl(z) + logl(logl(x));
    a[2].real = logl(y * z) + logl(logl(x));
    a[3].real = logl(z * y) + logl(logl(x));
  }
  if (logl(y) > 0) {
    for (int i = 4; i < 8; i++) {
      a[i].type = 1;
    }
    a[4].real = z * logl(x) + logl(logl(y));
    a[5].real = x * logl(z) + logl(logl(y));
    a[6].real = logl(x * z) + logl(logl(y));
    a[7].real = logl(z * x) + logl(logl(y));
  }
  if (logl(z) > 0) {
    for (int i = 8; i < 12; i++) {
      a[i].type = 1;
    }
    a[8].real = y * logl(x) + logl(logl(z));
    a[9].real = x * logl(y) + logl(logl(z));
    a[10].real = logl(y * x) + logl(logl(z));
    a[11].real = logl(x * y) + logl(logl(z));
  }
  int pos = max_element(a, a + 12) - a;
  puts(s[pos].c_str());
  return 0;
}
