#include <bits/stdc++.h>
using namespace std;
long double v[3];
long double cont(long double x, long double y, long double z, bool c) {
  if (c) return z * log(pow(x, y));
  return pow(y, z) * log(x);
}
void calc(bool &com, int &head, vector<int> &tail, long double &maxi,
          bool parenthesis, int k, vector<int> &resp) {
  long double temp = cont(v[k], v[tail[0]], v[tail[1]], parenthesis);
  if (maxi + 1e-14 < temp) {
    resp = tail;
    head = k;
    maxi = temp;
    com = parenthesis;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  char op[3] = {'x', 'y', 'z'};
  vector<vector<int> > perm(3);
  for (int i = 0; i < 3; i++) cin >> v[i];
  for (int i = 0; i < 3; i++)
    for (int j = 0; j < 3; j++)
      if (i != j) perm[i].push_back(j);
  vector<int> resp = perm[0];
  bool com = false;
  long double maxi = cont(v[0], v[1], v[2], false);
  int head = 0;
  for (int k = 0; k < perm.size(); k++) {
    vector<int> temp = perm[k];
    do {
      calc(com, head, temp, maxi, false, k, resp);
    } while (next_permutation(temp.begin(), temp.end()));
    temp = perm[k];
    do {
      calc(com, head, temp, maxi, true, k, resp);
    } while (next_permutation(temp.begin(), temp.end()));
  }
  if (com)
    cout << "(" << op[head] << "^" << op[resp[0]] << ")^" << op[resp[1]]
         << "\n";
  else
    cout << op[head] << "^" << op[resp[0]] << "^" << op[resp[1]] << "\n";
  return 0;
}
