#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<double, int> a, pair<double, int> b) {
  if (a.first == b.first) return a.second < b.second;
  return a.first > b.first;
}
int main() {
  ios_base::sync_with_stdio(0);
  int ansi;
  double x, y, z, x2, y2, z2;
  vector<pair<double, int> > ans;
  pair<double, int> aux;
  string t[12];
  t[0] = "x^y^z\n";
  t[1] = "x^z^y\n";
  t[2] = "(x^y)^z\n";
  t[3] = "(x^z)^y\n";
  t[4] = "y^x^z\n";
  t[5] = "y^z^x\n";
  t[6] = "(y^x)^z\n";
  t[7] = "(y^z)^x\n";
  t[8] = "z^x^y\n";
  t[9] = "z^y^x\n";
  t[10] = "(z^x)^y\n";
  t[11] = "(z^y)^x\n";
  cin >> x >> y >> z;
  bool flag = false;
  if (x <= 1 && y <= 1 && z <= 1) {
    x2 = 1 / x;
    y2 = 1 / y;
    z2 = 1 / z;
    flag = true;
  }
  if (x > 1 || flag) {
    if (flag) swap(x, x2);
    ans.push_back(make_pair(z * log(y) + log(log(x)), 0));
    ans.push_back(make_pair(y * log(z) + log(log(x)), 1));
    ans.push_back(make_pair(log(z) + log(y) + log(log(x)), 2));
    ans.push_back(make_pair(log(z) + log(y) + log(log(x)), 3));
    if (flag) swap(x, x2);
  }
  if (y > 1 || flag) {
    if (flag) swap(y, y2);
    ans.push_back(make_pair(z * log(x) + log(log(y)), 4));
    ans.push_back(make_pair(x * log(z) + log(log(y)), 5));
    ans.push_back(make_pair(log(z) + log(x) + log(log(y)), 6));
    ans.push_back(make_pair(log(z) + log(x) + log(log(y)), 7));
    if (flag) swap(y, y2);
  }
  if (z > 1 || flag) {
    if (flag) swap(z, z2);
    ans.push_back(make_pair(y * log(x) + log(log(z)), 8));
    ans.push_back(make_pair(x * log(y) + log(log(z)), 9));
    ans.push_back(make_pair(log(y) + log(x) + log(log(z)), 10));
    ans.push_back(make_pair(log(y) + log(x) + log(log(z)), 11));
    if (flag) swap(z, z2);
  }
  if (flag)
    sort(ans.begin(), ans.end());
  else
    sort(ans.begin(), ans.end(), cmp);
  cout << t[ans[0].second];
  return 0;
}
