#include <bits/stdc++.h>
using namespace std;
char print[13][10] = {"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"};
long double a[20];
int main() {
  long double x, y, z;
  while (cin >> x >> y >> z) {
    long double x1 = log(x);
    long double y1 = log(y);
    long double z1 = log(z);
    a[0] = x1 * pow(y, z);
    a[1] = x1 * pow(z, y);
    a[2] = a[3] = x1 * y * z;
    a[4] = y1 * pow(x, z);
    a[5] = y1 * pow(z, x);
    a[6] = a[7] = y1 * x * z;
    a[8] = z1 * pow(x, y);
    a[9] = z1 * pow(y, x);
    a[10] = a[11] = z1 * x * y;
    long double Max = -1;
    int flag;
    for (int i = 0; i < 12; i++) {
      if (a[i] > Max) {
        Max = a[i];
        flag = i;
      }
    }
    printf("%s\n", print[flag]);
  }
}
