#include <bits/stdc++.h>
using namespace std;
string a[20];
long double ans[20];
long double EPS = 1e-12;
int sign(long double x) { return x < -EPS ? -1 : (x > EPS); }
int main(int argc, char const *argv[]) {
  a[1] = "x^y^z";
  a[2] = "x^z^y";
  a[3] = "(x^y)^z";
  a[4] = "(x^z)^y";
  a[5] = "y^x^z";
  a[6] = "y^z^x";
  a[7] = "(y^x)^z";
  a[8] = "(y^z)^x";
  a[9] = "z^x^y";
  a[10] = "z^y^x";
  a[11] = "(z^x)^y";
  a[12] = "(z^y)^x";
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long double x, y, z;
  cin >> x >> y >> z;
  ans[1] = pow(y, z) * log(x);
  ans[2] = pow(z, y) * log(x);
  ans[3] = y * z * log(x);
  ans[4] = y * z * log(x);
  ans[5] = pow(x, z) * log(y);
  ans[6] = pow(z, x) * log(y);
  ans[7] = x * z * log(y);
  ans[8] = x * z * log(y);
  ans[9] = pow(x, y) * log(z);
  ans[10] = pow(y, x) * log(z);
  ans[11] = y * x * log(z);
  ans[12] = y * x * log(z);
  long double maxi = ans[12];
  int ind = 12;
  for (int(i) = (11); (i) >= (1); --(i)) {
    if (sign(ans[i] - maxi) >= 0) {
      maxi = ans[i];
      ind = i;
    }
  }
  cout << a[ind] << "\n";
  return 0;
}
