#include <bits/stdc++.h>
using namespace std;
bool pid_comp_second(pair<int, double> a, pair<int, double> b) {
  if (a.second == b.second) return a.first < b.first;
  return a.second > b.second;
}
int main() {
  double x, y, z;
  cin >> x >> y >> z;
  map<int, string> expr;
  expr[1] = "x^y^z";
  expr[2] = "x^z^y";
  expr[3] = "(x^y)^z";
  expr[5] = "y^x^z";
  expr[6] = "y^z^x";
  expr[7] = "(y^x)^z";
  expr[9] = "z^x^y";
  expr[10] = "z^y^x";
  expr[11] = "(z^x)^y";
  vector<pair<int, double> > nums;
  if (x < 1 || x < 1 || x < 1) {
    nums.push_back(make_pair(1, pow(y, z) * log(x)));
    nums.push_back(make_pair(2, pow(z, y) * log(x)));
    nums.push_back(make_pair(3, y * z * log(x)));
    nums.push_back(make_pair(5, pow(x, z) * log(y)));
    nums.push_back(make_pair(6, pow(z, x) * log(y)));
    nums.push_back(make_pair(7, x * z * log(y)));
    nums.push_back(make_pair(9, pow(x, y) * log(z)));
    nums.push_back(make_pair(10, pow(y, x) * log(z)));
    nums.push_back(make_pair(11, x * y * log(z)));
  } else {
    nums.push_back(make_pair(1, z * log(y) + log(log(x))));
    nums.push_back(make_pair(2, y * log(z) + log(log(x))));
    nums.push_back(make_pair(3, log(y) + log(z) + log(log(x))));
    nums.push_back(make_pair(5, z * log(x) + log(log(y))));
    nums.push_back(make_pair(6, x * log(z) + log(log(y))));
    nums.push_back(make_pair(7, log(x) + log(z) + log(log(y))));
    nums.push_back(make_pair(9, y * log(x) + log(log(z))));
    nums.push_back(make_pair(10, x * log(y) + log(log(z))));
    nums.push_back(make_pair(11, log(x) + log(y) + log(log(z))));
  }
  sort(nums.begin(), nums.end(), pid_comp_second);
  cout << expr[nums[0].first] << endl;
  return 0;
}
