#include <bits/stdc++.h>
typedef long double (*fnt)(long double x, long double y, long double z);
using namespace std;
long double f1(long double x, long double y, long double z) {
  return log(x) * pow(y, z);
}
long double f2(long double x, long double y, long double z) {
  return log(x) * pow(z, y);
}
long double f3(long double x, long double y, long double z) {
  return log(pow(x, y)) * z;
}
long double f4(long double x, long double y, long double z) {
  return log(pow(x, z)) * y;
}
long double f5(long double x, long double y, long double z) {
  return log(y) * pow(x, z);
}
long double f6(long double x, long double y, long double z) {
  return log(y) * pow(z, x);
}
long double f7(long double x, long double y, long double z) {
  return log(pow(y, x)) * z;
}
long double f8(long double x, long double y, long double z) {
  return log(pow(y, z)) * x;
}
long double f9(long double x, long double y, long double z) {
  return log(z) * pow(x, y);
}
long double f10(long double x, long double y, long double z) {
  return log(z) * pow(y, x);
}
long double f11(long double x, long double y, long double z) {
  return log(pow(z, x)) * y;
}
long double f12(long double x, long double y, long double z) {
  return log(pow(z, y)) * x;
}
string str[15];
fnt A[15] = {f1, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12};
int main(int argc, char const *argv[]) {
  str[1] = "x^y^z";
  str[2] = "x^z^y";
  str[3] = "(x^y)^z";
  str[4] = "(x^z)^y";
  str[5] = "y^x^z";
  str[6] = "y^z^x";
  str[7] = "(y^x)^z";
  str[8] = "(y^z)^x";
  str[9] = "z^x^y";
  str[10] = "z^y^x";
  str[11] = "(z^x)^y";
  str[12] = "(z^y)^x";
  long double x, y, z;
  cin >> x >> y >> z;
  int c = 1;
  for (int i = 2; i < 13; i++) {
    if (A[i](x, y, z) - 1e-9 > A[c](x, y, z)) {
      c = i;
    }
  }
  cout << str[c] << endl;
  return 0;
}
