#include <bits/stdc++.h>
using namespace std;
struct trp {
  long double x, y, z;
  int ind;
  void mk(long double a, long double b, long double c, int i) {
    x = a, y = b, z = c;
    ind = i;
  }
};
const int N = 12;
const long double eps = 1e-15;
trp a[N + 10];
string ans[] = {"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"};
bool cmp(trp a, trp b) {
  long double A = log(a.x);
  long double B = log(b.x);
  if (abs(A) < eps && abs(B) < eps) return a.ind > b.ind;
  if (A <= 0 && B > 0) return true;
  if (A < 0 && B >= 0) return true;
  if (A > 0 && B <= 0) return false;
  if (A >= 0 && B < 0) return false;
  bool flag = false;
  if (A < 0) {
    flag = true;
    A *= -1;
    B *= -1;
  }
  long double AA = log(A) + a.z * log(a.y);
  long double BB = log(B) + b.z * log(b.y);
  if (abs(AA - BB) < eps) return a.ind > b.ind;
  return (AA < BB) ^ flag;
}
int main() {
  ios::sync_with_stdio(false);
  long double x, y, z;
  cin >> x >> y >> z;
  a[0].mk(x, y, z, 0);
  a[1].mk(x, z, y, 1);
  a[2].mk(x, y * z, 1, 2);
  a[3].mk(x, z * y, 1, 3);
  a[4].mk(y, x, z, 4);
  a[5].mk(y, z, x, 5);
  a[6].mk(y, x * z, 1, 6);
  a[7].mk(y, z * x, 1, 7);
  a[8].mk(z, x, y, 8);
  a[9].mk(z, y, x, 9);
  a[10].mk(z, x * y, 1, 10);
  a[11].mk(z, y * x, 1, 11);
  sort(a, a + N, cmp);
  cout << ans[a[N - 1].ind] << "\n";
  return 0;
}
