#include <bits/stdc++.h>
using namespace std;
double a, b, c;
long double ans[9];
void print(int x) {
  if (x == 0) {
    printf("x^y^z\n");
    return;
  }
  if (x == 1) {
    printf("x^z^y\n");
    return;
  }
  if (x == 2) {
    printf("(x^y)^z\n");
    return;
  }
  if (x == 3) {
    printf("y^x^z\n");
    return;
  }
  if (x == 4) {
    printf("y^z^x\n");
    return;
  }
  if (x == 5) {
    printf("(y^x)^z\n");
    return;
  }
  if (x == 6) {
    printf("z^x^y\n");
    return;
  }
  if (x == 7) {
    printf("z^y^x\n");
    return;
  }
  if (x == 8) {
    printf("(z^x)^y\n");
    return;
  }
}
int main() {
  scanf("%lf%lf%lf", &a, &b, &c);
  long double mx = -0x3f3f3f3f;
  if (a <= 1 && b <= 1 && c <= 1) {
    ans[0] = pow(a, pow(b, c));
    ans[1] = pow(a, pow(c, b));
    ans[2] = pow(pow(a, c), b);
    ans[3] = pow(b, pow(a, c));
    ans[4] = pow(b, pow(c, a));
    ans[5] = pow(pow(b, a), c);
    ans[6] = pow(c, pow(a, b));
    ans[7] = pow(c, pow(b, a));
    ans[8] = pow(pow(c, b), a);
  } else {
    ans[0] = c * log(b) + log(log(a));
    ans[1] = b * log(c) + log(log(a));
    ans[2] = log(b * c) + log(log(a));
    ans[3] = c * log(a) + log(log(b));
    ans[4] = a * log(c) + log(log(b));
    ans[5] = log(a * c) + log(log(b));
    ans[6] = b * log(a) + log(log(c));
    ans[7] = a * log(b) + log(log(c));
    ans[8] = log(a * b) + log(log(c));
  }
  int k = 0;
  for (int i = 0; i < 9; i++) {
    if (mx < ans[i] - 1e-10) {
      mx = ans[i];
      k = i;
    }
  }
  print(k);
  return 0;
}
