#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:134217728")
using namespace std;
long double x, y, z;
string s[] = {"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[12];
int main() {
  cin >> x >> y >> z;
  if (min(z, min(x, y)) > 1) {
    a[0] = z * log(y) + log(log(x));
    a[1] = y * log(z) + log(log(x));
    a[2] = log(y * z) + log(log(x));
    a[3] = a[2];
    a[4] = z * log(x) + log(log(y));
    a[5] = x * log(z) + log(log(y));
    a[6] = log(x * z) + log(log(y));
    a[7] = a[6];
    a[8] = y * log(x) + log(log(z));
    a[9] = x * log(y) + log(log(z));
    a[10] = log(x * y) + log(log(z));
    a[11] = a[10];
  } else {
    a[0] = pow(y, z) * log(x);
    a[1] = pow(z, y) * log(x);
    a[2] = y * z * log(x);
    a[3] = a[2];
    a[4] = pow(x, z) * log(y);
    a[5] = pow(z, x) * log(y);
    a[6] = x * z * log(y);
    a[7] = a[6];
    a[8] = pow(x, y) * log(z);
    a[9] = pow(y, x) * log(z);
    a[10] = x * y * log(z);
    a[11] = a[10];
  }
  long double mx = *max_element(a, a + 12);
  for (int i = 0; i < 12; i++) {
    if (fabs(mx - a[i]) < 1e-17) {
      cout << s[i];
      return 0;
    }
  }
  return 0;
}
