#include <bits/stdc++.h>
using namespace std;
string ans[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"};
bool solve() {
  double first, second, z;
  scanf("%lf %lf %lf", &first, &second, &z);
  if (first < 5 && second < 5 && z < 5) {
    long double a[12] = {
        powl(second, z) * logl(first), powl(z, second) * logl(first),
        second * z * logl(first),      z * second * logl(first),
        powl(first, z) * logl(second), powl(z, first) * logl(second),
        first * z * logl(second),      z * first * logl(second),
        powl(first, second) * logl(z), powl(second, first) * logl(z),
        first * second * logl(z),      second * first * logl(z)};
    long double Max = a[0];
    int idx = 0;
    for (int i = 1; i < 12; i++) {
      if (a[i] > Max) {
        Max = a[i];
        idx = i;
      }
    }
    printf("%s\n", ans[idx].c_str());
  } else {
    long double a[12] = {z * logl(second) + logl(logl(first)),
                         second * logl(z) + logl(logl(first)),
                         logl(second * z * logl(first)),
                         logl(z * second * logl(first)),
                         z * logl(first) + logl(logl(second)),
                         first * logl(z) + logl(logl(second)),
                         logl(first * z * logl(second)),
                         logl(z * first * logl(second)),
                         second * logl(first) + logl(logl(z)),
                         first * logl(second) + logl(logl(z)),
                         logl(first * second * logl(z)),
                         logl(second * first * logl(z))};
    if (logl(first) < 1e-8) a[0] = a[1] = a[2] = a[3] = -1e9;
    if (logl(second) < 1e-8) a[4] = a[5] = a[6] = a[7] = -1e9;
    if (logl(z) < 1e-8) a[8] = a[9] = a[10] = a[11] = -1e9;
    long double Max = a[0];
    int idx = 0;
    for (int i = 1; i < 12; i++) {
      if (a[i] > Max) {
        Max = a[i];
        idx = i;
      }
    }
    printf("%s\n", ans[idx].c_str());
  }
  return true;
}
int main() {
  int t = 1;
  00000;
  while (t--) solve();
}
