#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7, maxn = 200005, ln = 17;
const int shift = 30, etf = mod - 1;
const double epcilon = 1e-10;
const long long int inf = (long long int)1e15;
const double PI = (double)3.141592653589793238;
string s[] = {"x^y^z",   "x^z^y", "(x^y)^z", "y^x^z",  "y^z^x",
              "(y^x)^z", "z^x^y", "z^y^x",   "(z^x)^y"};
double a[10], x, y, z;
double pop(double p, double q, double r) {
  if (p < 1.0) return -10.0 * inf;
  if (p == 1.0) return -1.0 * inf;
  return (r * log10(q)) + log10(log10(p));
}
double pom(double p, double q, double r) {
  if (p < 1.0) return -10.0 * inf;
  if (p == 1.0) return -1.0 * inf;
  return (log10(q) + log10(r)) + log10(log10(p));
}
void solve() {
  int idx;
  double mn = inf;
  a[0] = pop(1.0 / x, y, z);
  a[1] = pop(1.0 / x, z, y);
  a[2] = pom(1.0 / x, y, z);
  a[3] = pop(1.0 / y, x, z);
  a[4] = pop(1.0 / y, z, x);
  a[5] = pom(1.0 / y, x, z);
  a[6] = pop(1.0 / z, x, y);
  a[7] = pop(1.0 / z, y, x);
  a[8] = pom(1.0 / z, x, y);
  for (int i = 0; i < 9; i++) {
    if (mn - a[i] > epcilon) {
      idx = i;
      mn = a[i];
    }
  }
  cout << s[idx] << endl;
}
void solve2() {
  int idx;
  double mx = -100.0 * inf;
  a[0] = pop(x, y, z);
  a[1] = pop(x, z, y);
  a[2] = pom(x, y, z);
  a[3] = pop(y, x, z);
  a[4] = pop(y, z, x);
  a[5] = pom(y, x, z);
  a[6] = pop(z, x, y);
  a[7] = pop(z, y, x);
  a[8] = pom(z, x, y);
  for (int i = 0; i < 9; i++) {
    if (a[i] - mx > epcilon) {
      idx = i;
      mx = a[i];
    }
  }
  cout << s[idx] << endl;
}
int main() {
  cin >> x >> y >> z;
  if (x < 1.0 && y < 1.0 && z < 1.0) {
    solve();
    return 0;
  }
  solve2();
  return 0;
}
