#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10, MAXM = 1e6 + 10;
const int INF = INT_MAX, SINF = 0x3f3f3f3f;
const long long llINF = LLONG_MAX;
const int MOD = 1e9 + 7, mod = 998244353;
const int inv2 = 5e8 + 4;
long double x, y, z;
long double a[MAXN];
string s[MAXN];
int main() {
  cin >> x >> y >> z;
  a[1] = powl(y, z) * log(x);
  a[2] = powl(z, y) * log(x);
  a[3] = z * y * log(x);
  a[4] = z * y * log(x);
  a[5] = powl(x, z) * log(y);
  a[6] = powl(z, x) * log(y);
  a[7] = z * x * log(y);
  a[8] = z * x * log(y);
  a[9] = powl(x, y) * log(z);
  a[10] = powl(y, x) * log(z);
  a[11] = x * y * log(z);
  a[12] = x * y * log(z);
  int cnt = max_element(a + 1, a + 13) - a;
  s[1] = "x^y^z";
  s[2] = "x^z^y";
  s[3] = "(x^y)^z";
  s[4] = "(x^z)^y";
  s[5] = "y^x^z";
  s[6] = "y^z^x";
  s[7] = "(y^x)^z";
  s[8] = "(y^z)^x";
  s[9] = "z^x^y";
  s[10] = "z^y^x";
  s[11] = "(z^x)^y";
  s[12] = "(z^y)^x";
  cout << s[cnt];
  return 0;
}
