#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-12;
inline bool eq(const long double &x, const long double &y) {
  return abs(x - y) < eps || abs(x - y) < eps * abs(x);
}
int main() {
  long double x, y, z;
  {
    double a, b, c;
    scanf("%lf%lf%lf", &a, &b, &c);
    x = a, y = b, z = c;
  }
  long double logx = log(x);
  long double logy = log(y);
  long double logz = log(z);
  long double a[11];
  a[0] = logx * pow(y, z);
  a[1] = logx * pow(z, y);
  a[2] = logx * y * z;
  a[3] = a[2];
  a[4] = logy * pow(x, z);
  a[5] = logy * pow(z, x);
  a[6] = logy * x * z;
  a[7] = a[6];
  a[8] = logz * pow(x, y);
  a[9] = logz * pow(y, x);
  a[10] = logz * x * y;
  long double tmp = -1;
  int ansp = -1;
  for (int _n(11), i(0); i < _n; i++)
    if (!eq(a[i], tmp) && a[i] > tmp) {
      tmp = a[i];
      ansp = i;
    }
  if (ansp == 0) printf("x^y^z\n");
  if (ansp == 1) printf("x^z^y\n");
  if (ansp == 2) printf("(x^y)^z\n");
  if (ansp == 4) printf("y^x^z\n");
  if (ansp == 5) printf("y^z^x\n");
  if (ansp == 6) printf("(y^x)^z\n");
  if (ansp == 8) printf("z^x^y\n");
  if (ansp == 9) printf("z^y^x\n");
  if (ansp == 10) printf("(z^x)^y\n");
  return 0;
}
