#include <bits/stdc++.h>
using namespace std;
vector<pair<long double, string> > v;
void f1(long double x, long double y, long double z, string s) {
  v.push_back(make_pair(pow(y, z) * log(x), s));
}
void f2(long double x, long double y, long double z, string s) {
  v.push_back(make_pair(z * y * log(x), s));
}
int main() {
  long double x, y, z;
  cin >> x >> y >> z;
  f1(x, y, z, "x^y^z");
  f1(x, z, y, "x^z^y");
  f2(x, y, z, "(x^y)^z");
  f2(x, z, y, "(x^z)^y");
  f1(y, x, z, "y^x^z");
  f1(y, z, x, "y^z^x");
  f2(y, x, z, "(y^x)^z");
  f2(y, z, x, "(y^z)^x");
  f1(z, x, y, "z^x^y");
  f1(z, y, x, "z^y^x");
  f2(z, x, y, "(z^x)^y");
  f2(z, y, x, "(z^y)^x");
  long double mn = v[0].first;
  int ind = 0;
  for (int i = 0; i < v.size(); i++)
    if (mn < v[i].first) mn = v[i].first, ind = i;
  cout << v[ind].second << endl;
  return 0;
}
