#include <bits/stdc++.h>
using namespace std;
inline long long getnum() {
  char c = getchar();
  long long num, sign = 1;
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') sign = -1;
  for (num = 0; c >= '0' && c <= '9';) {
    c -= '0';
    num = num * 10 + c;
    c = getchar();
  }
  return num * sign;
}
char S[40];
int main() {
  long double a, b, c, p1, p2, p3;
  int a1, a2, a3, b1, b2, b3;
  cin >> a >> b >> c;
  if (a <= 1.1 || b <= 1.1 || c <= 1.1) {
    long double mx = pow(a, pow(b, c));
    strcpy(S, "x^y^z");
    if (pow(a, pow(c, b)) > mx) {
      mx = pow(a, pow(c, b));
      strcpy(S, "x^z^y");
    }
    if (pow(a, c * b) > mx) {
      mx = pow(a, c * b);
      strcpy(S, "(x^y)^z");
    }
    if (pow(b, pow(a, c)) > mx) {
      mx = pow(b, pow(a, c));
      strcpy(S, "y^x^z");
    }
    if (pow(b, pow(c, a)) > mx) {
      mx = pow(b, pow(c, a));
      strcpy(S, "y^z^x");
    }
    if (pow(b, a * c) > mx) {
      mx = pow(b, a * c);
      strcpy(S, "(y^x)^z");
    }
    if (pow(c, pow(a, b)) > mx) {
      mx = pow(c, pow(a, b));
      strcpy(S, "z^x^y");
    }
    if (pow(c, pow(b, a)) > mx) {
      mx = pow(c, pow(b, a));
      strcpy(S, "z^y^x");
    }
    if (pow(c, a * b) > mx) {
      strcpy(S, "(z^x)^y");
    }
    puts(S);
    return 0;
  }
  if (pow(b, c) >= b * c && pow(b, c) >= pow(c, b))
    a1 = 1, p1 = pow(b, c);
  else if (pow(c, b) >= b * c && pow(c, b) >= pow(b, c))
    a1 = 2, p1 = pow(c, b);
  else if (b * c >= pow(b, c) && b * c >= pow(c, b))
    a1 = 3, p1 = b * c;
  if (pow(a, c) >= a * c && pow(a, c) >= pow(c, a))
    a2 = 1, p2 = pow(a, c);
  else if (pow(c, a) >= a * c && pow(c, a) >= pow(a, c))
    a2 = 2, p2 = pow(c, a);
  else if (a * c >= pow(a, c) && a * c >= pow(c, a))
    a2 = 3, p2 = a * c;
  if (pow(a, b) >= a * b && pow(a, b) >= pow(b, a))
    a3 = 1, p3 = pow(a, b);
  else if (pow(b, a) >= b * a && pow(b, a) >= pow(a, b))
    a3 = 2, p3 = pow(b, a);
  else if (b * a >= pow(a, b) && b * a >= pow(b, a))
    a3 = 3, p3 = a * b;
  long double x1 = log(b) / log(a) * p2, x2 = log(c) / log(a) * p3;
  if (p1 >= x1 && p1 >= x2) {
    if (a1 == 1) puts("x^y^z");
    if (a1 == 2) puts("x^z^y");
    if (a1 == 3) puts("(x^y)^z");
  } else if (x1 >= p1 && x1 >= x2) {
    if (a2 == 1) puts("y^x^z");
    if (a2 == 2) puts("y^z^x");
    if (a2 == 3) puts("(y^x)^z");
  } else if (x2 >= p1 && x2 >= x1) {
    if (a3 == 1) puts("z^x^y");
    if (a3 == 2) puts("z^y^x");
    if (a3 == 3) puts("(z^x)^y");
  }
}
