#include <bits/stdc++.h>
using namespace std;
int n;
long double x, y, z;
int main(void) {
  cin >> x >> y >> z;
  long double logx = log(x);
  long double logy = log(y);
  long double logz = log(z);
  char str[11][20] = {"x^y^z",   "x^z^y", "(x^y)^z", "",      "y^x^z",  "y^z^x",
                      "(y^x)^z", " ",     "z^x^y",   "z^y^x", "(z^x)^y"};
  long double num[11];
  num[0] = logx * pow(y, z);
  num[1] = logx * pow(z, y);
  num[2] = logx * y * z;
  num[3] = num[2];
  num[4] = logy * pow(x, z);
  num[5] = logy * pow(z, x);
  num[6] = logy * x * z;
  num[7] = num[6];
  num[8] = logz * pow(x, y);
  num[9] = logz * pow(y, x);
  num[10] = logz * x * y;
  int pos = -1;
  long double maxx = -1;
  for (int i = 0; i < 11; i++) {
    if (abs(num[i] - maxx) > 1e-12 && maxx < num[i]) {
      maxx = num[i];
      pos = i;
    }
  }
  cout << str[pos] << endl;
}
