#include <bits/stdc++.h>
using namespace std;
int id[20] = {0, 1, 2};
int neg[20], n2[20];
double a[20], b[20], ans[20];
int cnt = 0;
string fuck[] = {"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"};
struct data {
  int x, id;
  double y;
  bool operator<(const data &b) const {
    if (x != b.x) return x < b.x;
    if (x) {
      return y < b.y || (y == b.y && id < b.id);
    }
    return y > b.y || (y == b.y && id < b.id);
  }
} hehe[20];
void f() {
  double temp = log(b[0]);
  if (temp < 0) ++neg[cnt], temp *= -1;
  ans[cnt++] = log(temp) + b[2] * log(b[1]);
  if (cnt % 2 == 0) cnt += 2;
}
void g() {
  double temp = b[2] * b[1] * log(b[0]);
  if (temp < 0) ++neg[cnt], temp *= -1;
  ans[cnt++] = log(temp);
  if (cnt % 2 == 0) cnt += 2;
}
int main() {
  for (int i = 0; i < 3; ++i) cin >> a[i];
  do {
    for (int i = 0; i < 3; ++i) b[i] = a[id[i]];
    f();
  } while (next_permutation(id, id + 3));
  cnt = 2;
  for (int i = 0; i < 3; ++i) id[i] = i;
  do {
    for (int i = 0; i < 3; ++i) b[i] = a[id[i]];
    g();
  } while (next_permutation(id, id + 3));
  for (int i = 0; i < 12; ++i)
    hehe[i].x = neg[i], hehe[i].y = ans[i], hehe[i].id = i;
  sort(hehe, hehe + 12);
  cout << fuck[hehe[0].id] << endl;
  return 0;
}
