#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1e-12;
bool gt(long double a, long double b) {
  if (fabs(a - b) < EPS)
    return false;
  else
    return a > b;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long double x, y, z;
  cin >> x >> y >> z;
  vector<pair<string, long double>> val;
  val.emplace_back("x^y^z", log(x) * pow(y, z));
  val.emplace_back("x^z^y", log(x) * pow(z, y));
  val.emplace_back("(x^y)^z", log(x) * y * z);
  val.emplace_back("(x^z)^y", log(x) * z * y);
  val.emplace_back("y^x^z", log(y) * pow(x, z));
  val.emplace_back("y^z^x", log(y) * pow(z, x));
  val.emplace_back("(y^x)^z", log(y) * x * z);
  val.emplace_back("z^x^y", log(z) * pow(x, y));
  val.emplace_back("z^y^x", log(z) * pow(y, x));
  val.emplace_back("(z^x)^y", log(z) * x * y);
  val.emplace_back("(z^y)^x", log(z) * y * x);
  string rs = "";
  long double mx = -numeric_limits<long double>::infinity();
  for (auto it : val) {
    if (gt(it.second, mx)) {
      rs = it.first;
      mx = it.second;
    }
  }
  cout << rs << "\n";
}
