#include <bits/stdc++.h>
using namespace std;
long double x, y, z;
long double a1[20], a2[20], a3[20];
string c[20];
inline long double f(long double x) { return (long double)log((long double)x); }
inline long double f1(long double x, long double y) {
  return (long double)pow((long double)x, (long double)y);
}
struct comp {
  int id;
  long double x1, x2, x3;
  inline friend bool operator<(comp a, comp b) {
    if (x <= 1.0 || y <= 1.0 || z <= 1.0)
      return a.x2 > b.x2;
    else
      return a.x1 > b.x1;
  }
} b[20];
int main() {
  cin >> x >> y >> z;
  long double lx = f(x), ly = f(y), lz = f(z);
  long double llx = f(lx), lly = f(ly), llz = f(lz);
  long double xy = f1(x, y), xz = f1(x, z), yx = f1(y, x), yz = f1(y, z),
              zx = f1(z, x), zy = f1(z, y);
  a1[1] = llx + ly * z;
  a1[2] = llx + lz * y;
  a1[3] = llx + ly + lz;
  a1[4] = lly + lx * z;
  a1[5] = lly + lz * x;
  a1[6] = lly + lx + lz;
  a1[7] = llz + lx * y;
  a1[8] = llz + ly * x;
  a1[9] = llz + lx + ly;
  a2[1] = yz * lx;
  a2[2] = zy * lx;
  a2[3] = z * y * lx;
  a2[4] = xz * ly;
  a2[5] = zx * ly;
  a2[6] = z * x * ly;
  a2[7] = xy * lz;
  a2[8] = yx * lz;
  a2[9] = x * y * lz;
  c[1] = "x^y^z";
  c[2] = "x^z^y";
  c[3] = "(x^y)^z";
  c[4] = "y^x^z";
  c[5] = "y^z^x";
  c[6] = "(y^x)^z";
  c[7] = "z^x^y";
  c[8] = "z^y^x";
  c[9] = "(z^x)^y";
  for (int i = 1; i <= 9; i++) {
    b[i].x1 = a1[i];
    b[i].x2 = a2[i];
    b[i].id = i;
  }
  sort(b + 1, b + 10);
  cout << c[b[1].id] << endl;
  return 0;
}
