#include <bits/stdc++.h>
using namespace std;
const int64_t INF = 0x7FFFFFFF;
const int MAX = 3;
const double eps = 1e-9;
struct Variable {
  char key;
  double value;
  bool operator<(const Variable& var) const {
    return key < var.key || (key == var.key && value < var.value);
  }
};
Variable var[MAX];
char ans[100];
double f1() {
  double x, y, z;
  x = var[0].value;
  y = var[1].value;
  z = var[2].value;
  return z * log(y) + log(log(x));
}
double f2() {
  double x, y, z;
  x = var[0].value;
  y = var[1].value;
  z = var[2].value;
  return log(log(x)) + log(y) + log(z);
}
double f3() {
  double x, y, z;
  x = var[0].value;
  y = var[1].value;
  z = var[2].value;
  return pow(x, pow(y, z));
}
double f4() {
  double x, y, z;
  x = var[0].value;
  y = var[1].value;
  z = var[2].value;
  return pow(pow(x, y), z);
}
int main(int argc, char* args[]) {
  double x, y, z;
  double maxs1 = -INF;
  cin >> x >> y >> z;
  var[0].key = 'x';
  var[0].value = x;
  var[1].key = 'y';
  var[1].value = y;
  var[2].key = 'z';
  var[2].value = z;
  sort(var, var + 3);
  ans[0] = '\0';
  if (x > 16 || y > 16 || z > 16) {
    do {
      double val1 = f1();
      double val2 = f2();
      if (!isnan(val1) && (val1 - maxs1) > eps) {
        maxs1 = val1;
        sprintf(ans, "%c^%c^%c", var[0].key, var[1].key, var[2].key);
      }
      next_permutation(var, var + 3);
      val1 = f1();
      if (!isnan(val1) && (val1 - maxs1) > eps) {
        maxs1 = val1;
        sprintf(ans, "%c^%c^%c", var[0].key, var[1].key, var[2].key);
      }
      prev_permutation(var, var + 3);
      if (!isnan(val2) && (val2 - maxs1) > eps) {
        maxs1 = val2;
        sprintf(ans, "(%c^%c)^%c", var[0].key, var[1].key, var[2].key);
      }
      next_permutation(var, var + 3);
      val2 = f2();
      if (!isnan(val2) && (val2 - maxs1) > eps) {
        maxs1 = val2;
        sprintf(ans, "(%c^%c)^%c", var[0].key, var[1].key, var[2].key);
      }
    } while (next_permutation(var, var + 3));
  } else if (x <= 16 && y <= 16 && z <= 16) {
    do {
      double val1 = f3();
      double val2 = f4();
      if (!isnan(val1) && (val1 - maxs1) > eps) {
        maxs1 = val1;
        sprintf(ans, "%c^%c^%c", var[0].key, var[1].key, var[2].key);
      }
      next_permutation(var, var + 3);
      val1 = f3();
      if (!isnan(val1) && (val1 - maxs1) > eps) {
        maxs1 = val1;
        sprintf(ans, "%c^%c^%c", var[0].key, var[1].key, var[2].key);
      }
      prev_permutation(var, var + 3);
      if (!isnan(val2) && (val2 - maxs1) > eps) {
        maxs1 = val2;
        sprintf(ans, "(%c^%c)^%c", var[0].key, var[1].key, var[2].key);
      }
      next_permutation(var, var + 3);
      val2 = f4();
      if (!isnan(val2) && (val2 - maxs1) > eps) {
        maxs1 = val2;
        sprintf(ans, "(%c^%c)^%c", var[0].key, var[1].key, var[2].key);
      }
    } while (next_permutation(var, var + 3));
  }
  puts(ans);
  return 0;
}
