#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000100;
const int INF = 1e9 + 10;
const double EPS = 1e-10;
long double x, y, z;
long double f1(long double x, long double y, long double z) {
  return pow(y, z) * log(x);
}
long double f2(long double x, long double y, long double z) {
  return y * z * log(x);
}
struct Node {
  long double v;
  int id;
  friend bool operator<(Node A, Node B) {
    if (A.v > B.v + EPS) return 1;
    if (fabs(A.v - B.v) < EPS) return A.id < B.id;
    return 0;
  }
};
Node a[20];
int n;
const string s[14] = {
    "",        "x^y^z",   "x^z^y", "(x^y)^z", "(x^z)^y", "y^x^z",   "y^z^x",
    "(y^x)^z", "(y^z)^x", "z^x^y", "z^y^x",   "(z^x)^y", "(z^y)^x",
};
int main() {
  while (cin >> x >> y >> z) {
    n = 12;
    for (int i = 1; i <= n; i++) a[i].id = i;
    a[1].v = f1(x, y, z);
    a[2].v = f1(x, z, y);
    a[3].v = f2(x, y, z);
    a[4].v = f2(x, z, y);
    a[5].v = f1(y, x, z);
    a[6].v = f1(y, z, x);
    a[7].v = f2(y, x, z);
    a[8].v = f2(y, z, x);
    a[9].v = f1(z, x, y);
    a[10].v = f1(z, y, x);
    a[11].v = f2(z, x, y);
    a[12].v = f2(z, y, x);
    sort(a + 1, a + n + 1);
    if (a[1].id == 4 || a[1].id == 8 || a[1].id == 12) a[1].id--;
    cout << s[a[1].id] << endl;
  }
  return 0;
}
