#include <bits/stdc++.h>
using namespace std;
const char *a[] = {"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"};
const double minn = -1e18;
const double esp = 1e-6;
int main() {
  double x, y, z;
  while (scanf("%lf %lf %lf", &x, &y, &z) == 3) {
    int flag = 0;
    double p[12];
    if (x > 1 || y > 1 || z > 1) {
      p[0] = x > 1 ? z * log10(y) + log10(log10(x)) : minn;
      p[1] = x > 1 ? y * log10(z) + log10(log10(x)) : minn;
      p[2] = x > 1 ? log10(z) + log10(y * log10(x)) : minn;
      p[3] = x > 1 ? log10(y) + log10(z * log10(x)) : minn;
      p[4] = y > 1 ? z * log10(x) + log10(log10(y)) : minn;
      p[5] = y > 1 ? x * log10(z) + log10(log10(y)) : minn;
      p[6] = y > 1 ? log10(z) + log10(x * log10(y)) : minn;
      p[7] = y > 1 ? log10(x) + log10(z * log10(y)) : minn;
      p[8] = z > 1 ? y * log10(x) + log10(log10(z)) : minn;
      p[9] = z > 1 ? x * log10(y) + log10(log10(z)) : minn;
      p[10] = z > 1 ? log10(y) + log10(x * log10(z)) : minn;
      p[11] = z > 1 ? log10(x) + log10(y * log10(z)) : minn;
    } else {
      p[0] = (double)pow(x, pow(y, z));
      p[1] = (double)pow(x, pow(z, y));
      p[2] = (double)pow(pow(x, y), z);
      p[3] = (double)pow(pow(x, z), y);
      p[4] = (double)pow(y, pow(x, z));
      p[5] = (double)pow(y, pow(z, x));
      p[6] = (double)pow(pow(y, x), z);
      p[7] = (double)pow(pow(y, z), x);
      p[8] = (double)pow(z, pow(x, y));
      p[9] = (double)pow(z, pow(y, x));
      p[10] = (double)pow(pow(z, x), y);
      p[11] = (double)pow(pow(z, y), x);
    }
    double max_num = p[0];
    for (int i = 0; i < 12; i++) {
      if (p[i] > max_num && p[i] - max_num > esp) {
        max_num = p[i];
        flag = i;
      }
    }
    printf("%s\n", a[flag]);
  }
  return 0;
}
