#include <bits/stdc++.h>
using namespace std;
bool cmp(const pair<long double, string> &a,
         const pair<long double, string> &b) {
  return a.first < b.first;
}
int main() {
  long double x, y, z;
  cin >> x >> y >> z;
  pair<long double, string> vals[9] = {
      {log(x) * pow(y, z), "x^y^z"}, {log(x) * pow(z, y), "x^z^y"},
      {log(x) * y * z, "(x^y)^z"},   {log(y) * pow(x, z), "y^x^z"},
      {log(y) * pow(z, x), "y^z^x"}, {log(y) * x * z, "(y^x)^z"},
      {log(z) * pow(x, y), "z^x^y"}, {log(z) * pow(y, x), "z^y^x"},
      {log(z) * x * y, "(z^x)^y"},
  };
  cout << max_element(vals, vals + 9, cmp)->second << endl;
  return 0;
}
