#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <class T>
inline bool Min(T &a, T b) {
  return a > b ? (a = b, true) : false;
}
template <class T>
inline bool Max(T &a, T b) {
  return a < b ? (a = b, true) : false;
}
inline int ni() {
  int a;
  scanf("%d", &a);
  return a;
}
inline ll nl() {
  ll a;
  scanf("%lld", &a);
  return a;
}
inline double nd() {
  double a;
  scanf("%lf", &a);
  return a;
}
inline void pi(int a) { printf("%d ", a); }
inline void pl(ll a) { printf("%lld ", a); }
inline void pd(double a) { printf("%.12lf ", a); }
const int N = 1e5 + 10;
using ld = long double;
void solve() {
  ld x, y, z;
  cin >> x >> y >> z;
  ld ans[10];
  ans[1] = log(x) * pow(y, z);
  ans[2] = log(x) * pow(z, y);
  ans[3] = log(x) * y * z;
  ans[4] = log(y) * pow(x, z);
  ans[5] = log(y) * pow(z, x);
  ans[6] = log(y) * x * z;
  ans[7] = log(z) * pow(x, y);
  ans[8] = log(z) * pow(y, x);
  ans[9] = log(z) * x * y;
  ans[0] = ans[1];
  int t = 1;
  for (int i = 1; i <= 9; i++)
    if (Max(ans[0], ans[i])) t = i;
  if (t == 1) puts("x^y^z");
  if (t == 2) puts("x^z^y");
  if (t == 3) puts("(x^y)^z");
  if (t == 4) puts("y^x^z");
  if (t == 5) puts("y^z^x");
  if (t == 6) puts("(y^x)^z");
  if (t == 7) puts("z^x^y");
  if (t == 8) puts("z^y^x");
  if (t == 9) puts("(z^x)^y");
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
