#include <bits/stdc++.h>
const int MAX = 1e5 + 11;
using namespace std;
const int MOD = (const int)(1e9 + 7);
const int INF = (const int)1e9;
static double f(double x, double y, double z) {
  double r = z * log(y) + log(log(x));
  return isfinite(r) ? r : -INF;
}
static double g(double x, double y, double z) {
  double r = log(z) + log(y) + log(log(x));
  return isfinite(r) ? r : -INF;
}
static bool cmd(const pair<pair<double, int>, string> &a,
                const pair<pair<double, int>, string> &b) {
  if (a.first.first > b.first.first) {
    return true;
  }
  if (fabs(a.first.first - b.first.first) < 0.00000001) {
    return a.first.second < b.first.second;
  }
  return false;
}
static void solve(int test) {
  double x, y, z;
  scanf("%lf %lf %lf", &x, &y, &z);
  bool was = false;
  if (x <= 1 && y <= 1 && z <= 1) {
    was = true;
    if (x < 1) x *= 100000;
    if (y < 1) y *= 100000;
    if (z < 1) z *= 100000;
  }
  vector<pair<pair<double, int>, string>> all;
  all.push_back({{f(x, y, z), 0}, "x^y^z"});
  all.push_back({{f(x, z, y), 1}, "x^z^y"});
  all.push_back({{g(x, y, z), 2}, "(x^y)^z"});
  all.push_back({{g(x, z, y), 3}, "(x^z)^y"});
  all.push_back({{f(y, x, z), 4}, "y^x^z"});
  all.push_back({{f(y, z, x), 5}, "y^z^x"});
  all.push_back({{g(y, x, z), 6}, "(y^x)^z"});
  all.push_back({{g(y, z, x), 7}, "(y^z)^x"});
  all.push_back({{f(z, x, y), 8}, "z^x^y"});
  all.push_back({{f(z, y, x), 9}, "z^y^x"});
  all.push_back({{g(z, x, y), 10}, "(z^x)^y"});
  all.push_back({{g(z, y, x), 11}, "(z^y)^x"});
  if (was) {
    int idx = 0;
    for (int i = 1; i < all.size(); ++i) {
      if (all[i].first.first < all[idx].first.first) {
        idx = i;
      } else if (fabs(all[i].first.first < all[idx].first.first) < 0.000001 &&
                 all[i].first.second < all[idx].first.second) {
        idx = i;
      }
    }
    printf("%s", all[idx].second.c_str());
  } else {
    sort(all.begin(), all.end(), cmd);
    printf("%s", all.front().second.c_str());
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  solve(0);
  return 0;
}
