#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-8;
const int mod = 1e9 + 7;
const int N = 1e6 + 10;
const long long INF = 1e18;
long long power(long long x, long long y) {
  long long t = 1;
  while (y > 0) {
    if (y % 2)
      y -= 1, t = t * x % mod;
    else
      y /= 2, x = x * x % mod;
  }
  return t;
}
pair<pair<long double, long double>, int> a[12];
bool eq(pair<long double, long double> a, pair<long double, long double> b) {
  long double x = a.first / b.first, y = b.second - a.second;
  if (abs(y) > 15) return 0;
  y = exp(y);
  if (abs(x - y) < 1e-12)
    return 1;
  else
    return 0;
}
int cmpl(pair<pair<long double, long double>, int> a,
         pair<pair<long double, long double>, int> b) {
  if (a.first.first == 0 && b.first.first == 0) return a.second < b.second;
  if (a.first.first == 0) return b.first.first > 0;
  if (b.first.first == 0) return a.first.first < 0;
  if (a.first.first < 0 && b.first.first >= 0) return 1;
  if (b.first.first < 0 && a.first.first >= 0) return 0;
  if (a.first.first < 0 && b.first.first < 0) {
    a.first.first *= -1;
    b.first.first *= -1;
    if (eq(a.first, b.first) == 1) return a.second < b.second;
    return cmpl(b, a);
  }
  long double x = a.first.first / b.first.first,
              y = b.first.second - a.first.second;
  if (abs(y) > 15) {
    return y > 0;
  }
  y = exp(y);
  if (abs(x - y) <= 1e-12)
    return a.second < b.second;
  else
    return x < y;
}
int cmp(pair<pair<long double, long double>, int> a,
        pair<pair<long double, long double>, int> b) {
  return cmpl(a, b);
}
string s[] = {"x^y^z",   "x^z^y", "(x^y)^z", "y^x^z",  "y^z^x",
              "(y^x)^z", "z^x^y", "z^y^x",   "(z^x)^y"};
int main() {
  long double x, y, z;
  double p1, p2, p3;
  scanf("%lf%lf%lf", &p1, &p2, &p3);
  x = p1, y = p2, z = p3;
  long double lx = log(p1), ly = log(p2), lz = log(p3);
  a[0] = make_pair(make_pair(-lx, z * ly), 0);
  a[1] = make_pair(make_pair(-lx, y * lz), 1);
  a[2] = make_pair(make_pair(-lx, lz + ly), 2);
  a[3] = make_pair(make_pair(-ly, z * lx), 3);
  a[4] = make_pair(make_pair(-ly, x * lz), 4);
  a[5] = make_pair(make_pair(-ly, lz + lx), 5);
  a[6] = make_pair(make_pair(-lz, y * lx), 6);
  a[7] = make_pair(make_pair(-lz, x * ly), 7);
  a[8] = make_pair(make_pair(-lz, ly + lx), 8);
  for (int i = 0; i < 8; ++i)
    if (abs(a[i].first.first) < 1e-9) a[i].first.first = 0;
  for (int i = 0; i < 9; ++i)
    for (int j = i + 1; j < 9; ++j)
      if (cmp(a[i], a[j]) == 0) {
        swap(a[i], a[j]);
      }
  cout << s[a[0].second] << endl;
  return 0;
}
