#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const long double eps = 1e-6;
const int mod = 1000000000 + 7;
const int INF = 1000000000;
const int maxn = 100;
int T, n, m;
double hehe, haha, ohoh;
long double x, y, z;
long double a[maxn];
bool eq(long double &x, long double &y) { return abs(x - y) < eps; }
int main() {
  while (~scanf("%lf%lf%lf", &hehe, &haha, &ohoh)) {
    x = hehe;
    y = haha;
    z = ohoh;
    long double logx = log(x);
    long double logy = log(y);
    long double logz = log(z);
    a[1] = logx * pow(y, z);
    a[2] = logx * pow(z, y);
    a[3] = logx * y * z;
    a[4] = logx * z * y;
    a[5] = logy * pow(x, z);
    a[6] = logy * pow(z, x);
    a[7] = logy * x * z;
    a[8] = logy * z * x;
    a[9] = logz * pow(x, y);
    a[10] = logz * pow(y, x);
    a[11] = logz * x * y;
    a[12] = logz * y * x;
    long double ans = a[1];
    int id = 1;
    for (int i = 2; i <= 12; i++) {
      if (a[i] > ans && abs(a[i] - ans) > eps) {
        ans = a[i];
        id = i;
      }
    }
    if (id == 1)
      printf("x^y^z\n");
    else if (id == 2)
      printf("x^z^y\n");
    else if (id == 3)
      printf("(x^y)^z\n");
    else if (id == 5)
      printf("y^x^z\n");
    else if (id == 6)
      printf("y^z^x\n");
    else if (id == 7)
      printf("(y^x)^z\n");
    else if (id == 9)
      printf("z^x^y\n");
    else if (id == 10)
      printf("z^y^x\n");
    else if (id == 11)
      printf("(z^x)^y\n");
  }
  return 0;
}
