#include <bits/stdc++.h>
using namespace std;
long double Ans = -1 * 1e300, x, y, z, A[14];
int p;
int main() {
  cin >> x >> y >> z;
  A[1] = pow(y, z) * log(x);
  A[2] = pow(z, y) * log(x);
  A[3] = A[4] = z * y * log(x);
  A[5] = pow(x, z) * log(y);
  A[6] = pow(z, x) * log(y);
  A[7] = A[8] = x * z * log(y);
  A[9] = pow(x, y) * log(z);
  A[10] = pow(y, x) * log(z);
  A[11] = A[12] = x * y * log(z);
  for (int i = 1; i <= 12; i++) {
    if (A[i] > Ans) {
      Ans = A[i];
      p = i;
    }
  }
  if (p == 1) cout << "x^y^z";
  if (p == 2) cout << "x^z^y";
  if (p == 3) cout << "(x^y)^z";
  if (p == 4) cout << "(x^z)^y";
  if (p == 5) cout << "y^x^z";
  if (p == 6) cout << "y^z^x";
  if (p == 7) cout << "(y^x)^z";
  if (p == 8) cout << "(y^z)^x";
  if (p == 9) cout << "z^x^y";
  if (p == 10) cout << "z^y^x";
  if (p == 11) cout << "(z^x)^y";
  if (p == 12) cout << "(z^y)^x";
  return 0;
}
