#include <bits/stdc++.h>
const int INF = 0x3f3f3f3f;
using namespace std;
long double resposta = -1 * INF;
int mp[3];
bool par = false;
long double calc(long double x, long double y, long double z, bool c) {
  if (c) return z * y * log(x);
  return pow(y, z) * log(x);
}
void calcula(int *v, map<int, long double> &p, bool c) {
  do {
    for (int i = 0; i < 3; i++) {
      long double x = p.find(v[0])->second;
      long double y = p.find(v[1])->second;
      long double z = p.find(v[2])->second;
      long double resp = calc(x, y, z, c);
      if (resp > resposta + 1e-8) {
        resposta = resp;
        mp[0] = v[0], mp[1] = v[1], mp[2] = v[2];
        par = c;
      }
    }
  } while (next_permutation(v, v + 3));
}
int main() {
  long double x, y, z;
  cin >> x >> y >> z;
  map<int, char> m;
  m[0] = 'x', m[1] = 'y', m[2] = 'z';
  map<int, long double> p;
  p[0] = x, p[1] = y, p[2] = z;
  int v[] = {0, 1, 2};
  calcula(v, p, false);
  calcula(v, p, true);
  char a, b, c;
  a = m.find(mp[0])->second;
  b = m.find(mp[1])->second;
  c = m.find(mp[2])->second;
  if (par) {
    printf("(%c^%c)^%c\n", a, b, c);
  } else
    printf("%c^%c^%c\n", a, b, c);
  return 0;
}
