#include <bits/stdc++.h>
using namespace std;
const double DELTA = 0.0000001;
const double MAX_DOUBLE = numeric_limits<double>::max();
const double MIN_DOUBLE = -numeric_limits<double>::max();
double f1(double x, double y, double z, double def) {
  if (log(x) < -DELTA) return def;
  if (log(x) < DELTA) return MIN_DOUBLE;
  return z * log(y) + log(log(x));
}
double f2(double x, double y, double z, double def) {
  if ((y * z) * log(x) < -DELTA) return def;
  if ((y * z) * log(x) < DELTA) return MIN_DOUBLE;
  return log((y * z) * log(x));
}
typedef double (*Func)(double x, double y, double z, double def);
void find_max(Func func, double arg1, double arg2, double arg3, string res_set,
              double& mx, string& res) {
  double curr = func(arg1, arg2, arg3, MIN_DOUBLE);
  if (curr > mx + DELTA) {
    res = res_set;
    mx = curr;
  }
}
void find_min(Func func, double arg1, double arg2, double arg3, string res_set,
              double& mn, string& res) {
  double curr = func(arg1, arg2, arg3, MAX_DOUBLE);
  if (curr < mn - DELTA) {
    res = res_set;
    mn = curr;
  }
}
int main(int argc, char* argv[]) {
  ios::sync_with_stdio(false);
  double x, y, z;
  cin >> x >> y >> z;
  string res;
  if (x > 1.0 + DELTA || y > 1.0 + DELTA || z > 1.0 + DELTA) {
    double mx = MIN_DOUBLE;
    find_max(f1, x, y, z, "x^y^z", mx, res);
    find_max(f1, x, z, y, "x^z^y", mx, res);
    find_max(f2, x, y, z, "(x^y)^z", mx, res);
    find_max(f2, x, z, y, "(x^z)^y", mx, res);
    find_max(f1, y, x, z, "y^x^z", mx, res);
    find_max(f1, y, z, x, "y^z^x", mx, res);
    find_max(f2, y, x, z, "(y^x)^z", mx, res);
    find_max(f2, y, z, x, "(y^z)^x", mx, res);
    find_max(f1, z, x, y, "z^x^y", mx, res);
    find_max(f1, z, y, x, "z^y^x", mx, res);
    find_max(f2, z, x, y, "(z^x)^y", mx, res);
    find_max(f2, z, y, x, "(z^y)^x", mx, res);
  } else {
    double mn = MAX_DOUBLE;
    find_min(f1, 1.0 / x, y, z, "x^y^z", mn, res);
    find_min(f1, 1.0 / x, z, y, "x^z^y", mn, res);
    find_min(f2, 1.0 / x, y, z, "(x^y)^z", mn, res);
    find_min(f2, 1.0 / x, z, y, "(x^z)^y", mn, res);
    find_min(f1, 1.0 / y, x, z, "y^x^z", mn, res);
    find_min(f1, 1.0 / y, z, x, "y^z^x", mn, res);
    find_min(f2, 1.0 / y, x, z, "(y^x)^z", mn, res);
    find_min(f2, 1.0 / y, z, x, "(y^z)^x", mn, res);
    find_min(f1, 1.0 / z, x, y, "z^x^y", mn, res);
    find_min(f1, 1.0 / z, y, x, "z^y^x", mn, res);
    find_min(f2, 1.0 / z, x, y, "(z^x)^y", mn, res);
    find_min(f2, 1.0 / z, y, x, "(z^y)^x", mn, res);
  }
  cout << res << endl;
  return 0;
}
