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