#include <bits/stdc++.h>
using namespace std;
int main() {
  long double x, y, z;
  long double arr[15];
  string s[15];
  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";
  while (cin >> x >> y >> z) {
    arr[1] = log(x) * pow(y, z);
    arr[2] = log(x) * pow(z, y);
    arr[3] = z * y * log(x);
    arr[4] = arr[3];
    arr[5] = log(y) * pow(x, z);
    arr[6] = log(y) * pow(z, x);
    arr[7] = z * x * log(y);
    arr[8] = arr[7];
    arr[9] = log(z) * pow(x, y);
    arr[10] = log(z) * pow(y, x);
    arr[11] = x * y * log(z);
    arr[12] = arr[11];
    long double zd = -1e16;
    int shu = 0;
    for (int i = 1; i <= 12; i++) {
      if (arr[i] > zd) {
        zd = arr[i];
        shu = i;
      }
    }
    cout << s[shu] << endl;
  }
  return 0;
}
