#include <bits/stdc++.h>
using namespace std;
long long powmod(long long a, long long b, long long MOD) {
  long long res = 1;
  a %= MOD;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % MOD;
    a = a * a % MOD;
  }
  return res;
}
char out[12][15] = {"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"};
long double a[15];
int main() {
  double x, y, z;
  scanf("%lf%lf%lf", &x, &y, &z);
  long double logx = log(x);
  long double logy = log(y);
  long double logz = log(z);
  long double a[11];
  a[0] = logx * powl(y, z);
  a[1] = logx * powl(z, y);
  a[2] = logx * y * z;
  a[3] = -1;
  a[4] = logy * powl(x, z);
  a[5] = logy * powl(z, x);
  a[6] = logy * x * z;
  a[7] = -1;
  a[8] = logz * powl(x, y);
  a[9] = logz * powl(y, x);
  a[10] = logz * x * y;
  a[11] = -1;
  long double ans = a[0];
  int ind = 0;
  for (int i = 1; i < 12; i++) {
    if (!fabs(ans - a[i]) < 1e-8 && a[i] > ans) {
      ans = a[i];
      ind = i;
    }
  }
  printf("%s\n", out[ind]);
  return 0;
}
