#include <bits/stdc++.h>
using namespace std;
long double x, y, z, ans = -1;
string s;
int main() {
  cin >> x >> y >> z;
  if (log(x) * pow(y, z) > ans) ans = log(x) * pow(y, z), s = "x^y^z";
  if (log(x) * pow(z, y) > ans) ans = log(x) * pow(z, y), s = "x^z^y";
  if (log(x) * y * z > ans) ans = log(x) * y * z, s = "(x^y)^z";
  if (log(y) * pow(x, z) > ans) ans = log(y) * pow(x, z), s = "y^x^z";
  if (log(y) * pow(z, x) > ans) ans = log(y) * pow(z, x), s = "y^z^x";
  if (log(y) * x * z > ans) ans = log(y) * x * z, s = "(y^x)^z";
  if (log(z) * pow(x, y) > ans) ans = log(z) * pow(x, y), s = "z^x^y";
  if (log(z) * pow(y, x) > ans) ans = log(z) * pow(y, x), s = "z^y^x";
  if (log(z) * x * y > ans) ans = log(z) * y * x, s = "(z^x)^y";
  cout << s;
  return 0;
}
