#include <bits/stdc++.h>
using namespace std;
const int INF = (int)(1e9);
const long long INF64 = (long long)(1e18);
const long double EPS = 1e-9;
const long double PI = 3.1415926535897932384626433832795;
int main() {
  double x, y, z;
  cin >> x >> y >> z;
  string arr[13];
  arr[1] = "x^y^z";
  arr[2] = "x^z^y";
  arr[3] = "(x^y)^z";
  arr[4] = "(x^z)^y";
  arr[5] = "y^x^z";
  arr[6] = "y^z^x";
  arr[7] = "(y^x)^z";
  arr[8] = "(y^z)^x";
  arr[9] = "z^x^y";
  arr[10] = "z^y^x";
  arr[11] = "(z^x)^y";
  arr[12] = "(z^y)^x";
  if (x > 1 && y > 1 && z > 1) {
    double res[13];
    res[1] = z * log(y) + log(log(x));
    res[2] = y * log(z) + log(log(x));
    res[3] = log(z) + log(y) + log(log(x));
    res[4] = log(y) + log(z) + log(log(x));
    res[5] = z * log(x) + log(log(y));
    res[6] = x * log(z) + log(log(y));
    res[7] = log(z) + log(x) + log(log(y));
    res[8] = log(x) + log(z) + log(log(y));
    res[9] = y * log(x) + log(log(z));
    res[10] = x * log(y) + log(log(z));
    res[11] = log(y) + log(x) + log(log(z));
    res[12] = log(x) + log(y) + log(log(z));
    double ans = -INF64 * 1.0;
    int pos;
    for (int i = 1; i <= 12; ++i) {
      if ((res[i] - ans) > EPS) {
        ans = res[i];
        pos = i;
      }
    }
    cout << arr[pos] << endl;
  } else if (x <= 1 && y <= 1 && z <= 1) {
    double res[13];
    res[1] = pow(x, pow(y, z));
    res[2] = pow(x, pow(z, y));
    res[3] = pow(pow(x, y), z);
    res[4] = pow(pow(x, z), y);
    res[5] = pow(y, pow(x, z));
    res[6] = pow(y, pow(z, x));
    res[7] = pow(pow(y, x), z);
    res[8] = pow(pow(y, z), x);
    res[9] = pow(z, pow(x, y));
    res[10] = pow(z, pow(y, x));
    res[11] = pow(pow(z, x), y);
    res[12] = pow(pow(z, y), x);
    double ans = -INF64 * 1.0;
    int pos;
    for (int i = 1; i <= 12; ++i) {
      if ((res[i] - ans) > EPS) {
        pos = i;
        ans = res[i];
      }
    }
    cout << arr[pos] << endl;
  } else {
    double ans = -INF64;
    int pos;
    double res[13];
    if (x > 1) {
      res[1] = z * log(y) + log(log(x));
      res[2] = y * log(z) + log(log(x));
      res[3] = log(z) + log(y * log(x));
      res[4] = log(y) + log(z * log(x));
      for (int i = 1; i <= 4; ++i) {
        if ((res[i] - ans) > EPS) {
          ans = res[i];
          pos = i;
        }
      }
    }
    if (y > 1) {
      res[5] = z * log(x) + log(log(y));
      res[6] = x * log(z) + log(log(y));
      res[7] = log(z) + log(x * log(y));
      res[8] = log(x) + log(z * log(y));
      for (int i = 5; i <= 8; ++i) {
        if ((res[i] - ans) > EPS) {
          ans = res[i];
          pos = i;
        }
      }
    }
    if (z > 1) {
      res[9] = y * log(x) + log(log(z));
      res[10] = x * log(y) + log(log(z));
      res[11] = log(y) + log(x * log(z));
      res[12] = log(x) + log(y * log(z));
      for (int i = 9; i <= 12; ++i) {
        if ((res[i] - ans) > EPS) {
          ans = res[i];
          pos = i;
        }
      }
    }
    cout << arr[pos] << endl;
  }
  return 0;
}
