#include <bits/stdc++.h>
using namespace std;
long double x, y, z;
struct node {
  long double sum;
  int id;
  friend bool operator<(node a, node b) {
    if (a.sum == b.sum) return a.id < b.id;
    return a.sum > b.sum;
  }
};
node s[20];
int main() {
  int i;
  while (cin >> x >> y >> z) {
    for (i = 0; i < 12; i++) s[i].id = i + 1;
    s[0].sum = pow(y, z) * log2(x);
    s[1].sum = pow(z, y) * log2(x);
    s[2].sum = y * z * log2(x);
    s[3].sum = y * z * log2(x);
    s[4].sum = pow(x, z) * log2(y);
    s[5].sum = pow(z, x) * log2(y);
    s[6].sum = x * z * log2(y);
    s[7].sum = x * z * log2(y);
    s[8].sum = pow(x, y) * log2(z);
    s[9].sum = pow(y, x) * log2(z);
    s[10].sum = x * y * log2(z);
    s[11].sum = x * y * log2(z);
    sort(s, s + 12);
    if (s[0].id == 1) puts("x^y^z");
    if (s[0].id == 2) puts("x^z^y");
    if (s[0].id == 3) puts("(x^y)^z");
    if (s[0].id == 4) puts("(x^z)^y");
    if (s[0].id == 5) puts("y^x^z");
    if (s[0].id == 6) puts("y^z^x");
    if (s[0].id == 7) puts("(y^x)^z");
    if (s[0].id == 8) puts("(y^z)^x");
    if (s[0].id == 9) puts("z^x^y");
    if (s[0].id == 10) puts("z^y^x");
    if (s[0].id == 11) puts("(z^x)^y");
    if (s[0].id == 12) puts("(z^y)^x");
  }
  return 0;
}
