#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
using PII = pair<int, int>;
using PIL = pair<int, LL>;
static constexpr int N = 1000010;
template <class T>
void in(T& first) {
  first = 0;
  int f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    first = first * 10 + ch - 48;
    ch = getchar();
  }
  first *= f;
}
template <class T>
inline void out(T first) {
  if (first < 0) {
    putchar('-');
    first = -first;
  }
  if (first > 9) out(first / 10);
  putchar(first % 10 + '0');
}
static string str[] = {
    "x^y^z",   "x^z^y",   "(x^y)^z", "(x^z)^y", "y^x^z",   "y^z^x",
    "(y^x)^z", "(y^z)^x", "z^x^y",   "z^y^x",   "(z^x)^y", "(z^y)^x",
};
long double cur, ori, first, second, z;
int idx = 0;
void update(int index) {
  if (fabs(ori - cur) <= 1e-6) return;
  if (ori < cur) idx = index, ori = cur;
}
inline void work() {
  cin >> first >> second >> z;
  ori = pow(second, z) * log(first), cur = pow(z, second) * log(first),
  update(1);
  cur = z * log(pow(first, second)), update(2);
  cur = second * log(pow(first, z)), update(3);
  cur = pow(first, z) * log(second), update(4);
  cur = pow(z, first) * log(second), update(5);
  cur = z * log(pow(second, first)), update(6);
  cur = first * log(pow(second, z)), update(7);
  cur = pow(first, second) * log(z), update(8);
  cur = pow(second, first) * log(z), update(9);
  cur = second * log(pow(z, first)), update(10);
  cur = first * log(pow(z, second)), update(11);
  cout << str[idx];
}
int main() {
  work();
  return 0;
}
