#include <bits/stdc++.h>
using namespace std;
long double a[3];
char ch[3] = {'x', 'y', 'z'};
const long double eps = 1e-15;
struct Node {
  int form;
  int ord[3];
  long double x, y, z;
  Node(int o0, int o1, int o2, int _form) {
    ord[0] = o0;
    ord[1] = o1;
    ord[2] = o2;
    x = a[o0];
    y = a[o1];
    z = a[o2];
    form = _form;
  }
  bool operator<(Node& o) {
    if (fabs(x - 1) < eps && fabs(o.x - 1) < eps) {
      return false;
    }
    long double logx1 = log(x), logx2 = log(o.x);
    if (fabs(logx1) < eps) {
      return logx2 > 0;
    }
    if (fabs(logx2) < eps) {
      return logx1 < 0;
    }
    if (logx1 > 0 && logx2 < 0) {
      return false;
    }
    if (logx1 < 0 && logx2 > 0) {
      return true;
    }
    long double k1 = Gao(y, z, form) + log(abs(logx1)),
                k2 = Gao(o.y, o.z, o.form) + log(abs(logx2));
    return logx1 < 0 ? k1 > k2 : k1 < k2;
  }
  long double Gao(long double y, long double z, int form) {
    if (form == 0) {
      return z * log(y);
    } else {
      return log(y) + log(z);
    }
  }
  void Output() {
    if (form == 0) {
      cout << ch[ord[0]] << "^" << ch[ord[1]] << "^" << ch[ord[2]] << endl;
    } else {
      cout << "(" << ch[ord[0]] << "^" << ch[ord[1]] << ")^" << ch[ord[2]]
           << endl;
    }
  }
};
void Update(Node& x, Node y) {
  if (x < y) {
    x = y;
  }
}
int main() {
  long double x, y, z;
  while (cin >> x >> y >> z) {
    a[0] = x;
    a[1] = y;
    a[2] = z;
    Node maxv = Node(0, 1, 2, 0);
    Update(maxv, Node(0, 2, 1, 0));
    Update(maxv, Node(0, 1, 2, 1));
    Update(maxv, Node(1, 0, 2, 0));
    Update(maxv, Node(1, 2, 0, 0));
    Update(maxv, Node(1, 0, 2, 1));
    Update(maxv, Node(2, 0, 1, 0));
    Update(maxv, Node(2, 1, 0, 0));
    Update(maxv, Node(2, 0, 1, 1));
    maxv.Output();
  }
  return 0;
}
