#include <bits/stdc++.h>
using namespace std;
bool compare(complex<long double> a, complex<long double> b) {
  if (imag(a) == 0 and imag(b) == 0)
    return real(a) > real(b);
  else if (imag(a) == 0 and imag(b) != 0)
    return true;
  else if (imag(a) != 0 and imag(b) == 0)
    return false;
  else if (imag(a) != 0 and imag(b) != 0)
    return real(a) < real(b);
}
complex<long double> eval(string exp, complex<long double>* inp) {
  if (exp.size() == 5) {
    complex<long double> x = inp[exp[0] - 'x'], y = inp[exp[2] - 'x'],
                         z = inp[exp[4] - 'x'];
    return z * log(y) + log(log(x));
  } else {
    complex<long double> x = inp[exp[1] - 'x'], y = inp[exp[3] - 'x'],
                         z = inp[exp[6] - 'x'];
    return log(y * z) + log(log(x));
  }
}
int main() {
  long double x1, y1, z1;
  cin >> x1 >> y1 >> z1;
  string exp[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"};
  int ans = -1;
  complex<long double> temp;
  complex<long double> inp[3] = {complex<long double>(x1, 0),
                                 complex<long double>(y1, 0),
                                 complex<long double>(z1, 0)};
  for (int i = 0; i < 9; i++) {
    if (ans == -1) {
      temp = eval(exp[i], inp);
      ans = i;
    } else if (compare(eval(exp[i], inp), temp)) {
      temp = eval(exp[i], inp);
      ans = i;
    }
  }
  cout << exp[ans] << endl;
}
