#include <bits/stdc++.h>
using namespace std;
int main() {
  long double x, y, z;
  string str[] = {"",        "x^y^z\n",   "x^z^y\n", "(x^y)^z\n", "y^x^z\n",
                  "y^z^x\n", "(y^x)^z\n", "z^x^y\n", "z^y^x\n",   "(z^x)^y\n"};
  cin >> x >> y >> z;
  long double a[13];
  a[1] = log(x) * pow(y, z);
  a[2] = log(x) * pow(z, y);
  a[3] = y * z * log(x);
  a[4] = log(y) * pow(x, z);
  a[5] = log(y) * pow(z, x);
  a[6] = x * z * log(y);
  a[7] = log(z) * pow(x, y);
  a[8] = log(z) * pow(y, x);
  a[9] = x * y * log(z);
  long double ans = a[1];
  int m = 1;
  for (int i = 2; i < 10; ++i) {
    if (a[i] > ans) {
      ans = a[i];
      m = i;
    }
  }
  cout << str[m];
  return 0;
}
