#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int maxn = 12;
const long double eps = 1e-6;
long double PI = acos((long double)(-1));
long double x[3];
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 maxi = -0x7FFFFFFF, mini = 0x7FFFFFFF;
long double res[maxn];
long double calc(string s) {
  long double y[3];
  int sz = s.size(), cnt = 0;
  for (int i = 0; i < sz; i++)
    if (s[i] == 'x' || s[i] == 'y' || s[i] == 'z') y[cnt++] = x[s[i] - 'x'];
  if (s[0] == '(')
    return y[1] * y[2] * log(y[0]);
  else
    return pow(y[1], y[2]) * log(y[0]);
}
int main() {
  std::ios_base::sync_with_stdio(false);
  for (int i = 0; i < 3; i++) cin >> x[i];
  for (int i = 0; i < maxn; i++) {
    res[i] = calc(s[i]);
    maxi = max(maxi, res[i]);
  }
  int idx;
  for (int i = 0; i < maxn; i++)
    if (fabs(res[i] - maxi) < mini) {
      mini = fabs(res[i] - maxi);
      idx = i;
    }
  cout << s[idx] << endl;
  return 0;
}
