#include <bits/stdc++.h>
using namespace std;
string ans[12] = {
    "x^y^z",   "x^z^y",   "(x^y)^z", "(x^z)^y", "y^x^z",   "y^z^x",
    "(y^x)^z", "(y^z)^x", "z^x^y",   "z^y^x",   "(z^x)^y", "(z^x)^y",
};
int main() {
  long double x, y, z, a[12], maxn = -1145141919810;
  cin >> x >> y >> z;
  if (x > 1 || y > 1 || z > 1) {
    for (int i = 0; i < 12; i++) a[i] = maxn;
    if (x > 1) a[0] = log10(log10(x)) + log10(y) * z;
    if (x > 1) a[1] = log10(log10(x)) + log10(z) * y;
    if (x > 1) a[2] = log10(log10(x)) + log10(y * z);
    if (x > 1) a[3] = log10(log10(x)) + log10(y * z);
    if (y > 1) a[4] = log10(log10(y)) + log10(x) * z;
    if (y > 1) a[5] = log10(log10(y)) + log10(z) * x;
    if (y > 1) a[6] = log10(log10(y)) + log10(x * z);
    if (y > 1) a[7] = log10(log10(y)) + log10(x * z);
    if (z > 1) a[8] = log10(log10(z)) + log10(x) * y;
    if (z > 1) a[9] = log10(log10(z)) + log10(y) * x;
    if (z > 1) a[10] = log10(log10(z)) + log10(x * y);
    if (z > 1) a[11] = log10(log10(z)) + log10(x * y);
    for (int i = 0; i < 12; i++) maxn = max(maxn, a[i]);
    for (int i = 0; i < 12; i++)
      if (maxn == a[i]) {
        cout << ans[i];
        return 0;
      }
  }
  a[0] = pow(x, pow(y, z));
  a[1] = pow(x, pow(z, y));
  a[2] = pow(pow(x, y), z);
  a[3] = pow(pow(x, z), y);
  a[4] = pow(y, pow(x, z));
  a[5] = pow(y, pow(z, x));
  a[6] = pow(pow(y, x), z);
  a[7] = pow(pow(y, z), x);
  a[8] = pow(z, pow(x, y));
  a[9] = pow(z, pow(y, x));
  a[10] = pow(pow(z, x), y);
  a[11] = pow(pow(z, y), x);
  for (int i = 0; i < 12; i++) maxn = max(maxn, a[i]);
  for (int i = 0; i < 12; i++)
    if (maxn == a[i]) {
      cout << ans[i];
      return 0;
    }
}
