#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-9;
int main() {
  long double x, y, z, a[20];
  string s[20];
  long double maxx;
  int pos = 0;
  s[1] = "x^y^z";
  s[2] = "x^z^y";
  s[3] = "(x^y)^z";
  s[4] = "(x^z)^y";
  s[5] = "y^x^z";
  s[6] = "y^z^x";
  s[7] = "(y^x)^z";
  s[8] = "(y^z)^x";
  s[9] = "z^x^y";
  s[10] = "z^y^x";
  s[11] = "(z^x)^y";
  s[12] = "(z^y)^x";
  cin >> x >> y >> z;
  a[1] = log(x) * pow(y, z);
  a[2] = log(x) * pow(z, y);
  a[3] = log(x) * y * z;
  a[4] = a[3];
  a[5] = log(y) * pow(x, z);
  a[6] = log(y) * pow(z, x);
  a[7] = log(y) * x * z;
  a[8] = a[7];
  a[9] = log(z) * pow(x, y);
  a[10] = log(z) * pow(y, x);
  a[11] = log(z) * x * y;
  a[12] = a[11];
  maxx = a[1];
  pos = 1;
  for (int i = 2; i <= 12; i++) {
    if (a[i] > maxx + eps) {
      pos = i;
      maxx = a[i];
    }
  }
  cout << s[pos] << endl;
  return 0;
}
