#include <bits/stdc++.h>
const int dx[] = {1, 0, -1, 0};
const int dy[] = {0, 1, 0, -1};
using namespace std;
string ans[12];
long double eps = 1e-7;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  ans[0] = "x^y^z", ans[1] = "x^z^y", ans[2] = "(x^y)^z", ans[3] = "(x^z)^y";
  ans[4] = "y^x^z", ans[5] = "y^z^x", ans[6] = "(y^x)^z", ans[7] = "(y^z)^x";
  ans[8] = "z^x^y", ans[9] = "z^y^x", ans[10] = "(z^x)^y", ans[11] = "(z^y)^x";
  long double x, y, z;
  cin >> x >> y >> z;
  vector<long double> num(12);
  num[0] = powl(y, z) * log(x);
  num[1] = powl(z, y) * log(x);
  num[2] = y * z * log(x);
  num[4] = powl(x, z) * log(y);
  num[5] = powl(z, x) * log(y);
  num[6] = x * z * log(y);
  num[8] = powl(x, y) * log(z);
  num[9] = powl(y, x) * log(z);
  num[10] = x * y * log(z);
  int index = 0;
  for (int i = 1; i < 12; i++) {
    if (i % 4 == 3) continue;
    if (num[index] < num[i]) index = i;
  }
  cout << ans[index] << endl;
  return 0;
}
