#include <bits/stdc++.h>
using namespace std;
const long double ESP = 1E-8;
long double cal(long double x, long double y, long double z) {
  return log(x) * pow(y, z);
}
long double ca(long double x, long double y, long double z) {
  return y * z * log(x);
}
int main() {
  const char* result[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"};
  long double a[20];
  long double x, y, z;
  cin >> x >> y >> z;
  a[0] = cal(x, y, z);
  a[1] = cal(x, z, y);
  a[2] = ca(x, y, z);
  a[3] = ca(x, z, y);
  a[4] = cal(y, x, z);
  a[5] = cal(y, z, x);
  a[6] = ca(y, x, z);
  a[7] = ca(y, z, x);
  a[8] = cal(z, x, y);
  a[9] = cal(z, y, x);
  a[10] = ca(z, x, y);
  a[11] = ca(z, y, x);
  long double maxn = a[0];
  int res = 0;
  for (int i = 1; i < 12; ++i) {
    if (maxn < a[i] - ESP) {
      maxn = a[i];
      res = i;
    }
  }
  printf("%s", result[res]);
  return 0;
}
