#include <bits/stdc++.h>
using namespace std;
const long long OO = 1e8;
const long double EPS = (1e-12);
int dcmp(double x, double y) { return fabs(x - y) <= EPS ? 0 : x < y ? -1 : 1; }
unsigned long long gcd(unsigned long long a, unsigned long long b) {
  for (;;) {
    if (a == 0) return b;
    b %= a;
    if (b == 0) return a;
    a %= b;
  }
}
unsigned long long lcm(unsigned long long a, unsigned long long b) {
  unsigned long long temp = gcd(a, b);
  return temp ? (a / temp * b) : 0;
}
int main() {
  ios::sync_with_stdio(false);
  vector<pair<long double, int> > v;
  map<int, string> mm;
  mm[1] = "x^y^z";
  mm[2] = "x^z^y";
  mm[3] = "(x^y)^z";
  mm[4] = "(x^z)^y";
  mm[5] = "y^x^z";
  mm[6] = "y^z^x";
  mm[7] = "(y^x)^z";
  mm[8] = "(y^z)^x";
  mm[9] = "z^x^y";
  mm[10] = "z^y^x";
  mm[11] = "(z^x)^y";
  mm[12] = "(z^y)^x";
  long double x, y, z;
  cin >> x >> y >> z;
  long double a1 = log(x) * pow(y, z);
  v.push_back(make_pair(a1, 1));
  long double a2 = log(x) * pow(z, y);
  v.push_back(make_pair(a2, 2));
  long double a3 = log(x) * y * z;
  v.push_back(make_pair(a3, 3));
  long double a4 = a3;
  v.push_back(make_pair(a4, 4));
  long double a5 = log(y) * pow(x, z);
  v.push_back(make_pair(a5, 5));
  long double a6 = log(y) * pow(z, x);
  v.push_back(make_pair(a6, 6));
  long double a7 = log(y) * x * z;
  v.push_back(make_pair(a7, 7));
  long double a8 = a7;
  v.push_back(make_pair(a8, 8));
  long double a9 = log(z) * pow(x, y);
  v.push_back(make_pair(a9, 9));
  long double a10 = log(z) * pow(y, x);
  v.push_back(make_pair(a10, 10));
  long double a11 = log(z) * x * y;
  v.push_back(make_pair(a11, 11));
  long double a12 = a11;
  v.push_back(make_pair(a12, 12));
  int ind = v[0].second;
  long double maxi = v[0].first;
  for (int i = (1); i < (int)(12); ++i) {
    if (dcmp(v[i].first, maxi) != 0 && v[i].first > maxi)
      ind = v[i].second, maxi = v[i].first;
  }
  cout << mm[ind];
  return 0;
}
