#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-6;
long double x, y, z, ans;
int p, indd;
string s[20];
bool cmp(long double a, long double b) {
  if (b + eps < a) return 1;
  return 0;
}
void val(long double a, long double b, long double c) {
  indd++;
  if (indd == 1 || cmp(pow(b, c) * log(a), ans)) {
    ans = pow(b, c) * log(a);
    p = indd;
  }
}
int main() {
  cin >> x >> y >> z;
  val(x, y, z);
  s[1] = "x^y^z";
  val(x, z, y);
  s[2] = "x^z^y";
  val(x, y * z, 1);
  s[3] = "(x^y)^z";
  val(x, z * y, 1);
  s[4] = "(x^z)^y";
  val(y, x, z);
  s[5] = "y^x^z";
  val(y, z, x);
  s[6] = "y^z^x";
  val(y, x * z, 1);
  s[7] = "(y^x)^z";
  val(y, z * x, 1);
  s[8] = "(y^z)^x";
  val(z, x, y);
  s[9] = "z^x^y";
  val(z, y, x);
  s[10] = "z^y^x";
  val(z, x * y, 1);
  s[11] = "(z^x)^y";
  val(z, y * x, 1);
  s[12] = "(z^y)^x";
  cout << s[p];
  return 0;
}
