#include <bits/stdc++.h>
using namespace std;
int main() {
  double x, y, z;
  cin >> x >> y >> z;
  double a[12] = {-200, -200, -200, -200, -200, -200,
                  -200, -200, -200, -200, -200, -200};
  string b[12] = {"x^y^z", "x^z^y", "(x^y)^z", "(x^z)^y",
                  "y^x^z", "y^z^x", "(y^x)^z", "(y^z)^x",
                  "z^x^y", "z^y^x", "(z^x)^y", "(z^y)^x"};
  if ((x > 1 && y > 1 && z > 1) || (x > 1 && y > 1 && z <= 1) ||
      (x > 1 && y <= 1 && z > 1) || (x <= 1 && y > 1 && z > 1) ||
      (x <= 1 && y <= 1 && z > 1) || (x <= 1 && y > 1 && z <= 1) ||
      (x > 1 && y <= 1 && z <= 1)) {
    if (x > 1) {
      a[2] = log(log(x) * y * z);
      a[3] = log(log(x) * y * z);
      a[0] = log(log(x)) + z * log(y);
      a[1] = log(log(x)) + y * log(z);
    }
    if (y > 1) {
      a[6] = log(log(y) * x * z);
      a[7] = log(log(y) * x * z);
      a[4] = log(log(y)) + z * log(x);
      a[5] = log(log(y)) + x * log(z);
    }
    if (z > 1) {
      a[10] = log(log(z) * y * x);
      a[11] = log(log(z) * y * x);
      a[9] = log(log(z)) + x * log(y);
      a[8] = log(log(z)) + y * log(x);
    }
  } else {
    a[0] = pow(x, pow(y, z));
    a[1] = pow(x, pow(z, y));
    a[2] = pow(x, y * z);
    a[3] = pow(x, y * z);
    a[4] = pow(y, pow(x, z));
    a[5] = pow(y, pow(z, x));
    a[6] = pow(y, z * x);
    a[7] = pow(y, z * x);
    a[8] = pow(z, pow(x, y));
    a[9] = pow(z, pow(y, x));
    a[10] = pow(z, x * y);
    a[11] = pow(z, x * y);
  }
  double max = -10.0;
  string str = "nothing bitch";
  for (int i = 0; i < 12; i++) {
    if (a[i] > max) {
      max = a[i];
      str = b[i];
    }
  }
  cout << str << endl;
}
