#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-15;
double x, y, z, arr[12];
int main() {
  ios::sync_with_stdio(0);
  cin >> x >> y >> z;
  int cnt = (x < 1) + (y < 1) + (z < 1);
  if (cnt != 3) {
    if (x > 1) {
      arr[1] = log(y) * z + log(log(x));
      arr[2] = log(z) * y + log(log(x));
      arr[3] = log(y) + log(z) + log(log(x));
    } else if (x < 1)
      arr[1] = arr[2] = arr[3] = -1e18;
    else
      arr[1] = arr[2] = arr[3] = -1e17;
    if (y > 1) {
      arr[4] = log(x) * z + log(log(y));
      arr[5] = log(z) * x + log(log(y));
      arr[6] = log(x) + log(z) + log(log(y));
    } else if (y < 1)
      arr[4] = arr[5] = arr[6] = -1e18;
    else
      arr[4] = arr[5] = arr[6] = -1e17;
    if (z > 1) {
      arr[7] = log(x) * y + log(log(z));
      arr[8] = log(y) * x + log(log(z));
      arr[9] = log(x) + log(y) + log(log(z));
    } else if (z < 1)
      arr[7] = arr[8] = arr[9] = -1e18;
    else
      arr[7] = arr[8] = arr[9] = -1e17;
  } else {
    arr[1] = -(log(y) * z + log(log(1 / x)));
    arr[2] = -(log(z) * y + log(log(1 / x)));
    arr[3] = -(log(y) + log(z) + log(log(1 / x)));
    arr[4] = -(log(x) * z + log(log(1 / y)));
    arr[5] = -(log(z) * x + log(log(1 / y)));
    arr[6] = -(log(x) + log(z) + log(log(1 / y)));
    arr[7] = -(log(x) * y + log(log(1 / z)));
    arr[8] = -(log(y) * x + log(log(1 / z)));
    arr[9] = -(log(x) + log(y) + log(log(1 / z)));
  }
  int mx = 1;
  for (int i = 2; i < 10; ++i)
    if (arr[i] > arr[mx]) mx = i;
  if (mx == 1) cout << "x^y^z";
  if (mx == 2) cout << "x^z^y";
  if (mx == 3) cout << "(x^y)^z";
  if (mx == 4) cout << "y^x^z";
  if (mx == 5) cout << "y^z^x";
  if (mx == 6) cout << "(y^x)^z";
  if (mx == 7) cout << "z^x^y";
  if (mx == 8) cout << "z^y^x";
  if (mx == 9) cout << "(z^x)^y";
  return 0;
}
