#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
double eps = 1e-12;
int idx(-1);
double m(-1e18), cur;
double a, b, c, xy, yz, zx, yx, zy, xz;
void f1() {
  cur = yz + log(a);
  if (cur > m + eps) {
    m = cur;
    idx = 0;
  }
  cur = zy + log(a);
  if (cur > m + eps) {
    m = cur;
    idx = 1;
  }
  cur = c + log(xy);
  if (cur > m + eps) {
    m = cur;
    idx = 2;
  }
  cur = b + log(xz);
  if (cur > m + eps) {
    m = cur;
    idx = 3;
  }
}
void f2() {
  cur = xz + log(b);
  if (cur > m + eps) {
    m = cur;
    idx = 4;
  }
  cur = zx + log(b);
  if (cur > m + eps) {
    m = cur;
    idx = 5;
  }
  cur = c + log(yx);
  if (cur > m + eps) {
    m = cur;
    idx = 6;
  }
  cur = a + log(yz);
  if (cur > m + eps) {
    m = cur;
    idx = 7;
  }
}
void f3() {
  cur = xy + log(c);
  if (cur > m + eps) {
    m = cur;
    idx = 8;
  }
  cur = yx + log(c);
  if (cur > m + eps) {
    m = cur;
    idx = 9;
  }
  cur = b + log(zx);
  if (cur > m + eps) {
    m = cur;
    idx = 10;
  }
  cur = a + log(zy);
  if (cur > m + eps) {
    m = cur;
    idx = 11;
  }
}
int main() {
  string s[12] = {"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"};
  double x, y, z;
  cin >> x >> y >> z;
  a = log(x), b = log(y), c = log(z);
  xy = y * log(x), yz = z * log(y), zx = x * log(z);
  yx = x * log(y), zy = y * log(z), xz = z * log(x);
  if (x > 1.05 && y > 1.05 && z > 1.05)
    f1(), f2(), f3();
  else if (x > 1.05 && y > 1.05)
    f1(), f2();
  else if (y > 1.05 && z > 1.05)
    f2(), f3();
  else if (x > 1.05 && z > 1.05)
    f1(), f3();
  else if (x > 1.05)
    f1();
  else if (y > 1.05)
    f2();
  else if (z > 1.05)
    f3();
  else {
    cur = pow(x, pow(y, z));
    if (cur > m + eps) {
      m = cur;
      idx = 0;
    }
    cur = pow(x, pow(z, y));
    if (cur > m + eps) {
      m = cur;
      idx = 1;
    }
    cur = pow(pow(x, y), z);
    if (cur > m + eps) {
      m = cur;
      idx = 2;
    }
    cur = pow(pow(x, z), y);
    if (cur > m + eps) {
      m = cur;
      idx = 3;
    }
    cur = pow(y, pow(x, z));
    if (cur > m + eps) {
      m = cur;
      idx = 4;
    }
    cur = pow(y, pow(z, x));
    if (cur > m + eps) {
      m = cur;
      idx = 5;
    }
    cur = pow(pow(y, x), z);
    if (cur > m + eps) {
      m = cur;
      idx = 6;
    }
    cur = pow(pow(y, z), x);
    if (cur > m + eps) {
      m = cur;
      idx = 7;
    }
    cur = pow(z, pow(x, y));
    if (cur > m + eps) {
      m = cur;
      idx = 8;
    }
    cur = pow(z, pow(y, x));
    if (cur > m + eps) {
      m = cur;
      idx = 9;
    }
    cur = pow(pow(z, x), y);
    if (cur > m + eps) {
      m = cur;
      idx = 10;
    }
    cur = pow(pow(z, y), x);
    if (cur > m + eps) {
      m = cur;
      idx = 11;
    }
  }
  cout << s[idx];
  return 0;
}
