#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long inf = LLONG_MAX;
const long long ninf = LLONG_MIN;
const long double eps = 1e-10;
const long long N = 1000005;
const long long LOGN = log2(N);
bool check(long double x, long double y) {
  return abs(x - y) < eps || abs(x - y) < eps * x;
}
int main() {
  ios_base::sync_with_stdio(0);
  long double x, y, z;
  cin >> x >> y >> z;
  long double logx = log(x);
  long double logy = log(y);
  long double logz = log(z);
  long double ans = -11;
  long double a[9];
  a[0] = logx * pow(y, z);
  a[1] = logx * pow(z, y);
  a[2] = logx * y * z;
  a[3] = logy * pow(x, z);
  a[4] = logy * pow(z, x);
  a[5] = logy * x * z;
  a[6] = logz * pow(x, y);
  a[7] = logz * pow(y, x);
  a[8] = logz * x * y;
  long long id;
  for (int i = 0; i < 9; i++) {
    if (ans < a[i]) {
      ans = a[i];
      id = i;
    }
  }
  if (id == 0) {
    cout << "x^y^z";
  } else if (id == 1) {
    cout << "x^z^y";
  } else if (id == 2) {
    cout << "(x^y)^z";
  } else if (id == 3) {
    cout << "y^x^z";
  } else if (id == 4) {
    cout << "y^z^x";
  } else if (id == 5) {
    cout << "(y^x)^z";
  } else if (id == 6) {
    cout << "z^x^y";
  } else if (id == 7) {
    cout << "z^y^x";
  } else if (id == 8) {
    cout << "(z^x)^y";
  } else {
    cout << "Fuck!!";
  }
  cout << "\n";
  return 0;
}
