#include <bits/stdc++.h>
using namespace std;
pair<pair<bool, long double>, string> a[13];
bool comp(pair<pair<bool, long double>, string> a,
          pair<pair<bool, long double>, string> b) {
  auto t1 = a.first, t2 = b.first;
  if (t1.second < -10000 && t2.second < -10000) return false;
  if (t1.first != t2.first) return t1.first;
  if (abs(t1.second - t2.second) <= 1e-6) return false;
  return (t1.second < t2.second) ^ t1.first;
}
int main() {
  long double x, y, z;
  cin >> x >> y >> z;
  a[1] = {{x < 1, z * log10(y) + (x < 1 ? log10(-log10(x)) : log10(log10(x)))},
          "x^y^z"};
  a[2] = {{x < 1, y * log10(z) + (x < 1 ? log10(-log10(x)) : log10(log10(x)))},
          "x^z^y"};
  a[3] = {{x < 1, log10(y * z) + (x < 1 ? log10(-log10(x)) : log10(log10(x)))},
          "(x^y)^z"};
  a[4] = {{x < 1, log10(y * z) + (x < 1 ? log10(-log10(x)) : log10(log10(x)))},
          "(x^z)^y"};
  a[5] = {{y < 1, z * log10(x) + (y < 1 ? log10(-log10(y)) : log10(log10(y)))},
          "y^x^z"};
  a[6] = {{y < 1, x * log10(z) + (y < 1 ? log10(-log10(y)) : log10(log10(y)))},
          "y^z^x"};
  a[7] = {{y < 1, log10(z * x) + (y < 1 ? log10(-log10(y)) : log10(log10(y)))},
          "(y^x)^z"};
  a[8] = {{y < 1, log10(z * x) + (y < 1 ? log10(-log10(y)) : log10(log10(y)))},
          "(y^z)^x"};
  a[9] = {{z < 1, y * log10(x) + (z < 1 ? log10(-log10(z)) : log10(log10(z)))},
          "z^x^y"};
  a[10] = {{z < 1, x * log10(y) + (z < 1 ? log10(-log10(z)) : log10(log10(z)))},
           "z^y^x"};
  a[11] = {{z < 1, log10(y * x) + (z < 1 ? log10(-log10(z)) : log10(log10(z)))},
           "(z^x)^y"};
  a[12] = {{z < 1, log10(y * x) + (z < 1 ? log10(-log10(z)) : log10(log10(z)))},
           "(z^y)^x"};
  int ind = 1;
  for (int i = 2; i <= 12; i++) ind = (comp(a[ind], a[i]) ? i : ind);
  cout << a[ind].second << endl;
  return 0;
}
