#include <bits/stdc++.h>
using namespace std;
vector<string> ve = {"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 x, y, z;
void get(char c, long double &a) {
  if (c == 'x') a = x;
  if (c == 'y') a = y;
  if (c == 'z') a = z;
}
long double calc(string s) {
  long double a, b, c;
  get(s.back(), c);
  s.pop_back();
  s.pop_back();
  if (s.back() == ')') {
    s.pop_back();
    get(s.back(), b);
    s.pop_back();
    s.pop_back();
    get(s.back(), a);
    return b * c * log(a);
  } else {
    get(s.back(), b);
    s.pop_back();
    s.pop_back();
    get(s.back(), a);
    return pow(b, c) * log(a);
  }
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> x >> y >> z;
  long double ans = -1;
  int id = -1;
  for (int i = 0; i < 12; i++) {
    long double t = calc(ve[i]);
    if (t > ans) {
      ans = t;
      id = i;
    }
  }
  cout << ve[id] << endl;
  return 0;
}
