#include <bits/stdc++.h>
using namespace std;
long double x, y, z;
struct xy {
  long double d;
  int p;
} a[15];
bool cmp(xy a1, xy a2) {
  if (a1.d != a2.d) return a1.d > a2.d;
  return a1.p < a2.p;
}
int main() {
  while (cin >> x >> y >> z) {
    a[0].d = pow(y, z) * log(x);
    a[0].p = 0;
    a[1].d = pow(z, y) * log(x);
    a[1].p = 1;
    a[2].d = z * y * log(x);
    a[2].p = 2;
    a[3].d = a[2].d;
    a[3].p = 3;
    a[4].d = log(y) * pow(x, z);
    a[4].p = 4;
    a[5].d = log(y) * pow(z, x);
    a[5].p = 5;
    a[6].d = log(y) * x * z;
    a[6].p = 6;
    a[7].d = a[6].d;
    a[7].p = 7;
    a[8].d = log(z) * pow(x, y);
    a[8].p = 8;
    a[9].d = log(z) * pow(y, x);
    a[9].p = 9;
    a[10].d = y * x * log(z);
    a[10].p = 10;
    a[11].d = a[10].d;
    a[11].p = 11;
    sort(a, a + 12, cmp);
    switch (a[0].p) {
      case 0:
        printf("x^y^z\n");
        break;
      case 1:
        printf("x^z^y\n");
        break;
      case 2:
        printf("(x^y)^z\n");
        break;
      case 3:
        printf("(x^z)^y\n");
        break;
      case 4:
        printf("y^x^z\n");
        break;
      case 5:
        printf("y^z^x\n");
        break;
      case 6:
        printf("(y^x)^z\n");
        break;
      case 7:
        printf("(y^z)^x\n");
        break;
      case 8:
        printf("z^x^y\n");
        break;
      case 9:
        printf("z^y^x\n");
        break;
      case 10:
        printf("(z^x)^y\n");
        break;
      case 11:
        printf("(z^y)^x\n");
        break;
    }
  }
  return 0;
}
