#include <bits/stdc++.h>
using namespace std;
double x, y, z;
string b[15];
void Pre() {
  b[1] = "x^y^z";
  b[2] = "x^z^y";
  b[3] = "(x^y)^z";
  b[4] = "(x^z)^y";
  b[5] = "y^x^z";
  b[6] = "y^z^x";
  b[7] = "(y^x)^z";
  b[8] = "(y^z)^x";
  b[9] = "z^x^y";
  b[10] = "z^y^x";
  b[11] = "(z^x)^y";
  b[12] = "(z^y)^x";
}
void solve() {
  vector<pair<double, int> > res;
  if (x < 1 && y < 1 && z < 1) {
    res.push_back(make_pair(pow(y, z) * log(x), 1));
    res.push_back(make_pair(pow(z, y) * log(x), 2));
    res.push_back(make_pair(y * z * log(x), 3));
    res.push_back(make_pair(y * z * log(x), 4));
    res.push_back(make_pair(pow(x, z) * log(y), 5));
    res.push_back(make_pair(pow(z, x) * log(y), 6));
    res.push_back(make_pair(x * z * log(y), 7));
    res.push_back(make_pair(x * z * log(y), 8));
    res.push_back(make_pair(pow(x, y) * log(z), 9));
    res.push_back(make_pair(pow(y, x) * log(z), 10));
    res.push_back(make_pair(y * x * log(z), 11));
    res.push_back(make_pair(y * x * log(z), 12));
  } else {
    if (x >= 1) res.push_back(make_pair(z * log(y) + log(log(x)), 1));
    if (x >= 1) res.push_back(make_pair(y * log(z) + log(log(x)), 2));
    if (x >= 1) res.push_back(make_pair(log(y) + log(z) + log(log(x)), 3));
    if (x >= 1) res.push_back(make_pair(log(y) + log(z) + log(log(x)), 4));
    if (y >= 1) res.push_back(make_pair(z * log(x) + log(log(y)), 5));
    if (y >= 1) res.push_back(make_pair(x * log(z) + log(log(y)), 6));
    if (y >= 1) res.push_back(make_pair(log(x) + log(z) + log(log(y)), 7));
    if (y >= 1) res.push_back(make_pair(log(x) + log(z) + log(log(y)), 8));
    if (z >= 1) res.push_back(make_pair(y * log(x) + log(log(z)), 9));
    if (z >= 1) res.push_back(make_pair(x * log(y) + log(log(z)), 10));
    if (z >= 1) res.push_back(make_pair(log(y) + log(x) + log(log(z)), 11));
    if (z >= 1) res.push_back(make_pair(log(y) + log(x) + log(log(z)), 12));
  }
  sort(res.begin(), res.end());
  int id = res[res.size() - 1].second;
  double maxx = res[res.size() - 1].first;
  for (int i = 0; i < res.size(); i++) {
    if (res[i].first == maxx) {
      id = min(id, res[i].second);
    }
  }
  printf("%s\n", b[id].c_str());
}
int main() {
  while (scanf("%lf %lf %lf", &x, &y, &z) != EOF) {
    Pre();
    solve();
  }
  return 0;
}
