#include <bits/stdc++.h>
using namespace std;
int main() {
  long double x, y, z;
  cin >> x >> y >> z;
  long double best = -1000000;
  int bestnum = 13;
  if (x > 1 + 0.00001) {
    if (z * log(y) + log(log(x)) - best > .000001) {
      best = z * log(y) + log(log(x));
      bestnum = 1;
    }
    if (y * log(z) + log(log(x)) - best > .000001) {
      best = y * log(z) + log(log(x));
      bestnum = 2;
    }
    if (log(y) + log(z) + log(log(x)) - best > .00001) {
      best = log(y) + log(z) + log(log(x));
      bestnum = 3;
    }
  }
  if (y > 1 + .00001) {
    if (z * log(x) + log(log(y)) - best > .000001) {
      best = z * log(x) + log(log(y));
      bestnum = 5;
    }
    if (x * log(z) + log(log(y)) - best > .000001) {
      best = x * log(z) + log(log(y));
      bestnum = 6;
    }
    if (log(x) + log(z) + log(log(y)) - best > .000001) {
      best = log(x) + log(z) + log(log(y));
      bestnum = 7;
    }
  }
  if (z > 1 + .00001) {
    if (y * log(x) + log(log(z)) - best > .000001) {
      best = y * log(x) + log(log(z));
      bestnum = 9;
    }
    if (x * log(y) + log(log(z)) - best > .000001) {
      best = x * log(y) + log(log(z));
      bestnum = 10;
    }
    if (log(x) + log(y) + log(log(z)) - best > .000001) {
      best = log(x) + log(y) + log(log(z));
      bestnum = 11;
    }
  }
  if (bestnum == 13) {
    if (pow(x, pow(y, z)) - best > .000001) {
      bestnum = 1;
      best = pow(x, pow(y, z));
    }
    if (pow(x, pow(z, y)) - best > .000001) {
      bestnum = 2;
      best = pow(x, pow(z, y));
    }
    if (pow(x, y * z) - best > .000001) {
      bestnum = 3;
      best = pow(x, y * z);
    }
    if (pow(y, pow(x, z)) - best > .000001) {
      bestnum = 5;
      best = pow(y, pow(x, z));
    }
    if (pow(y, pow(z, x)) - best > .000001) {
      bestnum = 6;
      best = pow(y, pow(z, x));
    }
    if (pow(y, x * z) - best > .000001) {
      bestnum = 7;
      best = pow(y, x * z);
    }
    if (pow(z, pow(x, y)) - best > .000001) {
      bestnum = 9;
      best = pow(z, pow(x, y));
    }
    if (pow(z, pow(y, x)) - best > .000001) {
      bestnum = 10;
      best = pow(z, pow(y, x));
    }
    if (pow(z, x * y) - best > .000001) {
      bestnum = 11;
      best = pow(z, x * y);
    }
  }
  if (bestnum == 1) cout << "x^y^z" << endl;
  if (bestnum == 2) cout << "x^z^y" << endl;
  if (bestnum == 3) cout << "(x^y)^z" << endl;
  if (bestnum == 5) cout << "y^x^z" << endl;
  if (bestnum == 6) cout << "y^z^x" << endl;
  if (bestnum == 7) cout << "(y^x)^z" << endl;
  if (bestnum == 9) cout << "z^x^y" << endl;
  if (bestnum == 10) cout << "z^y^x" << endl;
  if (bestnum == 11) cout << "(z^x)^y" << endl;
}
