#include <bits/stdc++.h>
using namespace std;
long double x, y, z, ans[13];
void deal(long double x, long double y, long double z, int a) {
  ans[a + 1] = pow(y, z) * log(x);
  ans[a + 2] = pow(z, y) * log(x);
  ans[a + 3] = ans[a + 4] = y * z * log(x);
}
void output(char x, char y, char z, int a) {
  if (a == 1)
    printf("%c^%c^%c\n", x, y, z);
  else if (a == 2)
    printf("%c^%c^%c\n", x, z, y);
  else if (a == 3)
    printf("(%c^%c)^%c\n", x, y, z);
  else
    printf("(%c^%c)^%c\n", x, z, y);
}
int main() {
  double x, y, z;
  while (cin >> x >> y >> z) {
    deal(x, y, z, 0);
    deal(y, x, z, 4);
    deal(z, x, y, 8);
    int pos = 1;
    for (int i = 2; i <= 12; i++)
      if (ans[i] > ans[pos]) pos = i;
    if (pos <= 4)
      output('x', 'y', 'z', pos);
    else if (pos <= 8)
      output('y', 'x', 'z', pos - 4);
    else
      output('z', 'x', 'y', pos - 8);
  }
  return 0;
}
