#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<long double, int> a, pair<long double, int> b) {
  if (fabs(a.first - b.first) < (long double)1e-9) return a.second > b.second;
  return a.first < b.first;
}
long double nlog(long double x) { return log(x) / log((long double)0.5); }
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  map<int, string> ans;
  ans[1] = "x^y^z";
  ans[2] = "x^z^y";
  ans[3] = "(x^y)^z";
  ans[5] = "y^x^z";
  ans[6] = "y^z^x";
  ans[7] = "(y^x)^z";
  ans[9] = "z^x^y";
  ans[10] = "z^y^x";
  ans[11] = "(z^x)^y";
  long double x, y, z;
  cin >> x >> y >> z;
  vector<pair<long double, int>> vx = {make_pair(log(y) + log(z), 3),
                                       make_pair(y * log(z), 2),
                                       make_pair(z * log(y), 1)};
  sort(vx.begin(), vx.end(), cmp);
  if (x < (long double)1) reverse(vx.begin(), vx.end());
  vector<pair<long double, int>> vy = {make_pair(log(x) + log(z), 7),
                                       make_pair(x * log(z), 6),
                                       make_pair(z * log(x), 5)};
  sort(vy.begin(), vy.end(), cmp);
  if (y < (long double)1) reverse(vy.begin(), vy.end());
  vector<pair<long double, int>> vz = {make_pair(log(x) + log(y), 11),
                                       make_pair(x * log(y), 10),
                                       make_pair(y * log(x), 9)};
  sort(vz.begin(), vz.end(), cmp);
  if (z < (long double)1) reverse(vz.begin(), vz.end());
  vector<pair<long double, int>> sup_1, inf_1, one;
  if (x > (long double)1)
    sup_1.push_back(vx.back()), sup_1.back().first += log(log(x));
  if (x < (long double)1)
    inf_1.push_back(vx.back()),
        inf_1.back().first =
            (inf_1.back().first) / log((long double)0.5) + nlog(nlog(x));
  if (x == (long double)1) one.push_back(vx.back()), one.back().first = 1;
  if (y > (long double)1)
    sup_1.push_back(vy.back()), sup_1.back().first += log(log(y));
  if (y < (long double)1)
    inf_1.push_back(vy.back()),
        inf_1.back().first =
            (inf_1.back().first) / log((long double)0.5) + nlog(nlog(y));
  if (y == (long double)1) one.push_back(vy.back()), one.back().first = 1;
  if (z > (long double)1)
    sup_1.push_back(vz.back()), sup_1.back().first += log(log(z));
  if (z < (long double)1)
    inf_1.push_back(vz.back()),
        inf_1.back().first =
            (inf_1.back().first) / log((long double)0.5) + nlog(nlog(z));
  if (z == (long double)1) one.push_back(vz.back()), one.back().first = 1;
  sort(sup_1.begin(), sup_1.end(), cmp);
  sort(inf_1.begin(), inf_1.end(), cmp);
  sort(one.begin(), one.end(), cmp);
  if (!sup_1.empty())
    cout << ans[sup_1.back().second] << '\n';
  else if (!one.empty())
    cout << ans[one.back().second] << '\n';
  else
    cout << ans[inf_1.back().second] << '\n';
  return 0;
}
