#include <bits/stdc++.h>
using namespace std;
const int dx[5] = {0, 1, -1, 0, 0};
const int dy[5] = {0, 0, 0, -1, 1};
const double pi = acos(-1.0);
long double x, y, z;
long double ans[15];
void input_LL(long long &r) {
  r = 0;
  char t = getchar();
  while (!isdigit(t)) t = getchar();
  long long sign = 1;
  if (t == '-') sign = -1;
  while (!isdigit(t)) t = getchar();
  while (isdigit(t)) r = r * 10 + t - '0', t = getchar();
  r = r * sign;
}
void input_int(int &r) {
  r = 0;
  char t = getchar();
  while (!isdigit(t)) t = getchar();
  int sign = 1;
  if (t == '-') sign = -1;
  while (!isdigit(t)) t = getchar();
  while (isdigit(t)) r = r * 10 + t - '0', t = getchar();
  r = r * sign;
}
int main() {
  cin >> x >> y >> z;
  ans[1] = pow(y, z) * log(x);
  ans[2] = pow(z, y) * log(x);
  ans[3] = z * y * log(x);
  ans[4] = ans[3];
  ans[5] = pow(x, z) * log(y);
  ans[6] = pow(z, x) * log(y);
  ans[7] = x * z * log(y);
  ans[8] = ans[7];
  ans[9] = pow(x, y) * log(z);
  ans[10] = pow(y, x) * log(z);
  ans[11] = x * y * log(z);
  ans[12] = ans[11];
  int j = 1;
  for (int i = 2; i <= 12; i++)
    if (ans[j] < ans[i]) j = i;
  switch (j) {
    case 1:
      puts("x^y^z");
      break;
    case 2:
      puts("x^z^y");
      break;
    case 3:
      puts("(x^y)^z");
      break;
    case 4:
      puts("(x^z)^y");
      break;
    case 5:
      puts("y^x^z");
      break;
    case 6:
      puts("y^z^x");
      break;
    case 7:
      puts("(y^x)^z");
      break;
    case 8:
      puts("(y^z)^x");
      break;
    case 9:
      puts("z^x^y");
      break;
    case 10:
      puts("z^y^x");
      break;
    case 11:
      puts("(z^x)^y");
      break;
    case 12:
      puts("(z^y)^x");
      break;
  }
  return 0;
}
