#include <bits/stdc++.h>
using namespace std;
long double maxi = -100000.00;
vector<string> vec;
int c = 0;
void pushInVec() {
  vec.push_back("x^y^z");
  vec.push_back("x^z^y");
  vec.push_back("(x^y)^z");
  vec.push_back("(x^z)^y");
  vec.push_back("y^x^z");
  vec.push_back("y^z^x");
  vec.push_back("(y^x)^z");
  vec.push_back("(y^z)^x");
  vec.push_back("z^x^y");
  vec.push_back("z^y^x");
  vec.push_back("(z^x)^y");
  vec.push_back("(z^y)^x");
}
void solve1(long double x, long double y, long double z, int idx, int id = 0) {
  long double res;
  if (id)
    res = pow(x, pow(y, z));
  else
    res = z * log(y) + log(log(x));
  if (maxi < res) {
    maxi = res;
    c = idx;
  }
}
void solve2(long double x, long double y, long double z, int idx, int id = 0) {
  long double res;
  if (id)
    res = pow(x, y * z);
  else
    res = log(y) + log(z) + log(log(x));
  if (maxi < res) {
    maxi = res;
    c = idx;
  }
}
int main() {
  pushInVec();
  double x, y, z;
  scanf("%lf %lf %lf", &x, &y, &z);
  if (x <= 1.0 && y <= 1.0 && z <= 1.0) {
    solve1(x, y, z, 0, 1);
    solve1(x, z, y, 1, 1);
    solve2(x, y, z, 2, 1);
    solve2(x, z, y, 3, 1);
    solve1(y, x, z, 4, 1);
    solve1(y, z, x, 5, 1);
    solve2(y, x, z, 6, 1);
    solve2(y, z, x, 7, 1);
    solve1(z, x, y, 8, 1);
    solve1(z, y, x, 9, 1);
    solve2(z, x, y, 10, 1);
    solve2(z, y, x, 11, 1);
  }
  if (x > 1.0) {
    solve1(x, y, z, 0);
    solve1(x, z, y, 1);
    solve2(x, y, z, 2);
    solve2(x, z, y, 3);
  }
  if (y > 1.0) {
    solve1(y, x, z, 4);
    solve1(y, z, x, 5);
    solve2(y, x, z, 6);
    solve2(y, z, x, 7);
  }
  if (z > 1.0) {
    solve1(z, x, y, 8);
    solve1(z, y, x, 9);
    solve2(z, x, y, 10);
    solve2(z, y, x, 11);
  }
  cout << vec[c] << endl;
  return 0;
}
