#include <bits/stdc++.h>
using namespace std;
double ans[13];
int id[13];
bool flag[13];
char s[13][13] = {" ",     "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"};
bool cmp(int i, int j) { return ans[i] < ans[j]; }
bool cmp1(int i, int j) {
  if (flag[i] != flag[j]) return flag[i] > flag[j];
  return ans[i] > ans[j];
}
int main() {
  double x, y, z, xx, yy, zz;
  scanf("%lf%lf%lf", &x, &y, &z);
  for (int i = 1; i <= 12; i++) {
    id[i] = i;
    flag[i] = true;
  }
  if (x < 1 && y < 1 && z < 1) {
    xx = 1.0 / x;
    yy = 1.0 / y;
    zz = 1.0 / z;
    ans[1] = z * log(y) + log(log(xx));
    ans[2] = y * log(z) + log(log(xx));
    ans[3] = log(y * z * log(xx));
    ans[4] = log(y * z * log(xx));
    ans[5] = z * log(x) + log(log(yy));
    ans[6] = x * log(z) + log(log(yy));
    ans[7] = log(x * z * log(yy));
    ans[8] = log(x * z * log(yy));
    ans[9] = y * log(x) + log(log(zz));
    ans[10] = x * log(y) + log(log(zz));
    ans[11] = log(x * y * log(zz));
    ans[12] = log(x * y * log(zz));
    sort(id + 1, id + 13, cmp);
    printf("%s", s[id[1]]);
  } else {
    if (x >= 1) {
      ans[1] = z * log(y) + log(log(x));
      ans[2] = y * log(z) + log(log(x));
      ans[3] = log(y * z * log(x));
      ans[4] = log(y * z * log(x));
    } else
      flag[1] = flag[2] = flag[3] = flag[4] = false;
    if (y >= 1) {
      ans[5] = z * log(x) + log(log(y));
      ans[6] = x * log(z) + log(log(y));
      ans[7] = log(x * z * log(y));
      ans[8] = log(x * z * log(y));
    } else
      flag[5] = flag[6] = flag[7] = flag[8] = false;
    if (z >= 1) {
      ans[9] = y * log(x) + log(log(z));
      ans[10] = x * log(y) + log(log(z));
      ans[11] = log(x * y * log(z));
      ans[12] = log(x * y * log(z));
    } else
      flag[9] = flag[10] = flag[11] = flag[12] = false;
    sort(id + 1, id + 13, cmp1);
    printf("%s", s[id[1]]);
  }
  return 0;
}
