#include <bits/stdc++.h>
using namespace std;
const long double eps = 0.00000001;
struct Number {
  long double x, y, z;
  Number() {}
  Number(long double x, long double y, long double z) {
    this->x = x;
    this->y = y;
    this->z = z;
  }
};
bool cmp(Number A, Number B) {
  if (A.x == 1) {
    if (B.x < 1) return true;
    return false;
  }
  if (B.x == 1) {
    if (A.x < 1) return false;
    return true;
  }
  if (A.x < 3 && A.y < 3 && A.z < 3) {
    return (pow(A.x, pow(A.y, A.z)) - eps > pow(B.x, pow(B.y, B.z)));
  }
  A.x = log(A.x);
  B.x = log(B.x);
  if (A.x > eps && B.x < -eps) return true;
  if (A.x < -eps && B.x > eps) return false;
  bool inv = false;
  if (A.x < -eps && B.x < -eps) A.x *= -1, B.x *= -1, inv = true;
  if (A.x > -eps && A.x < eps) A.x = eps / 100;
  if (B.x > -eps && B.x < eps) B.x = eps / 100;
  long double a = log(A.x) + log(A.y) * A.z;
  long double b = log(B.x) + log(B.y) * B.z;
  if (abs(a - b) < eps) return false;
  return ((a > b) ^ inv);
}
Number a[12];
string ans[12];
void init(long double x, long double y, long double z) {
  a[0] = Number(x, y, z);
  ans[0] = "x^y^z";
  a[1] = Number(x, z, y);
  ans[1] = "x^z^y";
  a[2] = Number(x, y * z, 1);
  ans[2] = "(x^y)^z";
  a[4] = Number(y, x, z);
  ans[4] = "y^x^z";
  a[5] = Number(y, z, x);
  ans[5] = "y^z^x";
  a[6] = Number(y, x * z, 1);
  ans[6] = "(y^x)^z";
  a[8] = Number(z, x, y);
  ans[8] = "z^x^y";
  a[9] = Number(z, y, x);
  ans[9] = "z^y^x";
  a[10] = Number(z, x * y, 1);
  ans[10] = "(z^x)^y";
}
int main() {
  long double x, y, z;
  cin >> x >> y >> z;
  init(x, y, z);
  int bestInd = 0;
  for (int i = 1; i < 12; i++) {
    if (i == 3 || i == 7 || i == 11) continue;
    if (a[i].x == 1 && a[bestInd].x > 1) continue;
    if (cmp(a[i], a[bestInd]) == true) bestInd = i;
  }
  cout << ans[bestInd] << '\n';
}
