#include <bits/stdc++.h>
using namespace std;
double power1(double x, double y, double z) {
  double res = pow(y, z) * log(x);
  return res;
}
double product1(double x, double y, double z) {
  double res = (y * z) * log(x);
  return res;
}
double power2(double x, double y, double z) {
  if (x < 1.0) return -1e100;
  double res = z * log(y) + log(log(x));
  return res;
}
double product2(double x, double y, double z) {
  if (x < 1.0) return -1e100;
  double res = log(y * z) + log(log(x));
  return res;
}
bool eq(double a, double b) { return fabs(a - b) < 1e-14; }
bool les(double a, double b) { return a + 1e-14 < b; }
int main() {
  double x, y, z;
  cin >> x >> y >> z;
  cout.setf(ios::fixed);
  cout.precision(15);
  if (eq(max(max(x, y), z), 1.0)) {
    if (eq(x, 1.0)) {
      cout << "x^y^z" << endl;
    } else if (eq(y, 1.0)) {
      cout << "y^x^z" << endl;
    } else {
      cout << "z^x^y" << endl;
    }
    return 0;
  }
  vector<pair<double, string> > v;
  if (les(max(max(x, y), z), 1.0)) {
    v.push_back(make_pair(power1(x, y, z), "x^y^z"));
    v.push_back(make_pair(power1(x, z, y), "x^z^y"));
    v.push_back(make_pair(product1(x, y, z), "(x^y)^z"));
    v.push_back(make_pair(product1(x, z, y), "(x^z)^y"));
    v.push_back(make_pair(power1(y, x, z), "y^x^z"));
    v.push_back(make_pair(power1(y, z, x), "y^z^x"));
    v.push_back(make_pair(product1(y, x, z), "(y^x)^z"));
    v.push_back(make_pair(product1(y, z, x), "(y^z)^x"));
    v.push_back(make_pair(power1(z, x, y), "z^x^y"));
    v.push_back(make_pair(power1(z, y, x), "z^y^x"));
    v.push_back(make_pair(product1(z, x, y), "(z^x)^y"));
    v.push_back(make_pair(product1(z, y, x), "(z^y)^x"));
  } else {
    v.push_back(make_pair(power2(x, y, z), "x^y^z"));
    v.push_back(make_pair(power2(x, z, y), "x^z^y"));
    v.push_back(make_pair(product2(x, y, z), "(x^y)^z"));
    v.push_back(make_pair(product2(x, z, y), "(x^z)^y"));
    v.push_back(make_pair(power2(y, x, z), "y^x^z"));
    v.push_back(make_pair(power2(y, z, x), "y^z^x"));
    v.push_back(make_pair(product2(y, x, z), "(y^x)^z"));
    v.push_back(make_pair(product2(y, z, x), "(y^z)^x"));
    v.push_back(make_pair(power2(z, x, y), "z^x^y"));
    v.push_back(make_pair(power2(z, y, x), "z^y^x"));
    v.push_back(make_pair(product2(z, x, y), "(z^x)^y"));
    v.push_back(make_pair(product2(z, y, x), "(z^y)^x"));
  }
  double maxV = v[0].first;
  string ans = v[0].second;
  for (int i = 1; i < 12; i++) {
    if (les(maxV, v[i].first)) {
      maxV = v[i].first;
      ans = v[i].second;
    }
  }
  cout << ans << endl;
}
