#include <bits/stdc++.h>
using namespace std;
using namespace std;
pair<complex<double>, pair<int, string> > eval[11];
int get(complex<double> x, complex<double> y) {
  if (x.imag() == 0 && y.imag() == 0)
    return x.real() > y.real();
  else if (x.imag() != 0 && y.imag() == 0)
    return false;
  else if (x.imag() == 0 && y.imag() != 0)
    return true;
  else if (x.imag() != 0 && y.imag() != 0)
    return x.real() < y.real();
  return 0;
}
bool compare(pair<complex<double>, pair<int, string> > a,
             pair<complex<double>, pair<int, string> > b) {
  int x = get(a.first, b.first);
  if (x != 0) return x > 0;
  return a.second.first < b.second.first;
}
int main() {
  double a, b, c;
  cin >> a >> b >> c;
  complex<double> x(a, 0), y(b, 0), z(c, 0);
  eval[0].first = z * log(y) + log(log(x));
  eval[0].second.second = "x^y^z";
  eval[1].first = y * log(z) + log(log(x));
  eval[1].second.second = "x^z^y";
  eval[2].first = log(z * y) + log(log(x));
  eval[2].second.second = "(x^y)^z";
  eval[3].first = log(z * y) + log(log(x));
  eval[3].second.second = "(x^z)^y";
  eval[4].first = z * log(x) + log(log(y));
  eval[4].second.second = "y^x^z";
  eval[5].first = x * log(z) + log(log(y));
  eval[5].second.second = "y^z^x";
  eval[6].first = log(x * z) + log(log(y));
  eval[6].second.second = "(y^x)^z";
  eval[7].first = log(x * z) + log(log(y));
  eval[7].second.second = "(y^z)^x";
  eval[8].first = y * log(x) + log(log(z));
  eval[8].second.second = "z^x^y";
  eval[9].first = x * log(y) + log(log(z));
  eval[9].second.second = "z^y^x";
  eval[10].first = log(x * y) + log(log(z));
  eval[10].second.second = "(z^x)^y";
  eval[11].first = log(x * y) + log(log(z));
  eval[11].second.second = "(z^y)^x";
  for (int i = 0; i < 12; ++i) eval[i].second.first = i;
  sort(eval, eval + 12, compare);
  cout << eval[0].second.second;
}
