#include <bits/stdc++.h>
double aa[12];
int sign[12];
int compare(const void *a, const void *b) {
  int i = *(int *)a;
  int j = *(int *)b;
  if (sign[i] != sign[j]) return sign[j] - sign[i];
  if (sign[i] == 0) return i - j;
  return aa[i] == aa[j] ? i - j : aa[i] > aa[j] ? -sign[i] : sign[i];
}
void power(int i, double x, double y, double z) {
  if (x == 1)
    sign[i] = 0;
  else if (x > 1) {
    sign[i] = 1;
    aa[i] = z * log(y) + log(log(x));
  } else {
    sign[i] = -1;
    aa[i] = z * log(y) + log(-log(x));
  }
}
void power_(int i, double x, double yz) {
  if (x == 1)
    sign[i] = 0;
  else if (x > 1) {
    sign[i] = 1;
    aa[i] = log(yz) + log(log(x));
  } else {
    sign[i] = -1;
    aa[i] = log(yz) + log(-log(x));
  }
}
int main() {
  static char ss[12][16] = {"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"};
  static int ii[12];
  double x, y, z;
  int i;
  scanf("%lf%lf%lf", &x, &y, &z);
  power(0, x, y, z);
  power(1, x, z, y);
  power_(2, x, y * z);
  power_(3, x, y * z);
  power(4, y, x, z);
  power(5, y, z, x);
  power_(6, y, x * z);
  power_(7, y, x * z);
  power(8, z, x, y);
  power(9, z, y, x);
  power_(10, z, x * y);
  power_(11, z, x * y);
  for (i = 0; i < 12; i++) ii[i] = i;
  qsort(ii, 12, sizeof *ii, compare);
  printf("%s\n", ss[ii[0]]);
  return 0;
}
