#include <bits/stdc++.h>
using namespace std;
int main() {
  long double x, y, z;
  cin >> x >> y >> z;
  long double res = log(x) * pow(y, z);
  int out = 1;
  if (log(x) * pow(z, y) > res) out = 2, res = log(x) * pow(z, y);
  if (log(x) * z * y > res) out = 3, res = log(x) * z * y;
  if (log(y) * pow(x, z) > res) out = 5, res = log(y) * pow(x, z);
  if (log(y) * pow(z, x) > res) out = 6, res = log(y) * pow(z, x);
  if (log(y) * x * z > res) out = 7, res = log(y) * x * z;
  if (log(z) * pow(x, y) > res) out = 9, res = log(z) * pow(x, y);
  if (log(z) * pow(y, x) > res) out = 10, res = log(z) * pow(y, x);
  if (log(z) * x * y > res) out = 11;
  if (out == 1) puts("x^y^z");
  if (out == 2) puts("x^z^y");
  if (out == 3) puts("(x^y)^z");
  if (out == 5) puts("y^x^z");
  if (out == 6) puts("y^z^x");
  if (out == 7) puts("(y^x)^z");
  if (out == 9) puts("z^x^y");
  if (out == 10) puts("z^y^x");
  if (out == 11) puts("(z^x)^y");
}
