#include <bits/stdc++.h>
using namespace std;
const int MX = 100005, infi = 1000000, mod = 1000000007;
long double x, y, z, mx, lx, ly, lz, eps = 0.000000001;
string sol = "x^y^z";
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> x >> y >> z;
  mx = pow(y, z) * log(x);
  if (pow(z, y) * log(x) - mx > eps) mx = pow(z, y) * log(x), sol = "x^z^y";
  if (z * log(pow(x, y)) - mx > eps) mx = z * log(pow(x, y)), sol = "(x^y)^z";
  if (y * log(pow(x, z)) - mx > eps) mx = y * log(pow(x, z)), sol = "(x^z)^y";
  if (pow(x, z) * log(y) - mx > eps) mx = pow(x, z) * log(y), sol = "y^x^z";
  if (pow(z, x) * log(y) - mx > eps) mx = pow(z, x) * log(y), sol = "y^z^x";
  if (z * log(pow(y, x)) - mx > eps) mx = z * log(pow(y, x)), sol = "(y^x)^z";
  if (x * log(pow(y, z)) - mx > eps) mx = x * log(pow(y, z)), sol = "(y^z)^x";
  if (pow(x, y) * log(z) - mx > eps) mx = pow(x, y) * log(z), sol = "z^x^y";
  if (pow(y, x) * log(z) - mx > eps) mx = pow(y, x) * log(z), sol = "z^y^x";
  if (y * log(pow(z, x)) - mx > eps) mx = y * log(pow(z, x)), sol = "(z^x)^y";
  if (x * log(pow(z, y)) - mx > eps) mx = x * log(pow(z, y)), sol = "(z^y)^x";
  cout << sol;
  return 0;
}
