#include <bits/stdc++.h>
using namespace std;
int main() {
  double x, y, z;
  double tempx, tempy, tempz;
  while (cin >> x >> y >> z) {
    int ans = 0;
    tempx = x, tempy = y, tempz = z;
    double start = -INT_MAX;
    if (log(x) > 0) {
      if (start < z * log(y) + log(log(x)) - 1e-7) {
        start = z * log(y) + log(log(x));
      }
      if (start < y * log(z) + log(log(x)) - 1e-7) {
        start = y * log(z) + log(log(x));
        ans = 1;
      }
      if (start < log(y * z) + log(log(x)) - 1e-7) {
        start = log(y * z) + log(log(x));
        ans = 2;
      }
    }
    x = tempy, y = tempx;
    if (log(x) > 0) {
      if (start < z * log(y) + log(log(x)) - 1e-7) {
        start = z * log(y) + log(log(x));
        ans = 4;
      }
      if (start < y * log(z) + log(log(x)) - 1e-7) {
        start = y * log(z) + log(log(x));
        ans = 5;
      }
      if (start < log(y * z) + log(log(x)) - 1e-7) {
        start = log(y * z) + log(log(x));
        ans = 6;
      }
    }
    x = tempz, y = tempx, z = tempy;
    if (log(x) > 0) {
      if (start < z * log(y) + log(log(x)) - 1e-7) {
        start = z * log(y) + log(log(x));
        ans = 8;
      }
      if (start < y * log(z) + log(log(x)) - 1e-7) {
        start = y * log(z) + log(log(x));
        ans = 9;
      }
      if (start < log(y * z) + log(log(x)) - 1e-7) {
        start = log(y * z) + log(log(x));
        ans = 10;
      }
    }
    if (x <= 1.0 && y <= 1.0 && z <= 1.0) {
      x = tempx, y = tempy, z = tempz;
      double start = pow(x, pow(y, z));
      ans = 0;
      if (start < pow(x, pow(z, y)) - 1e-7) {
        start = pow(x, pow(z, y));
        ans = 1;
      }
      if (start < pow(pow(x, y), z) - 1e-7) {
        start = pow(pow(x, y), z);
        ans = 2;
      }
      x = tempy, y = tempx;
      if (start < pow(x, pow(y, z)) - 1e-7) {
        start = pow(x, pow(y, z));
        ans = 4;
      }
      if (start < pow(x, pow(z, y)) - 1e-7) {
        start = pow(x, pow(z, y));
        ans = 5;
      }
      if (start < pow(pow(x, y), z) - 1e-7) {
        start = pow(pow(x, y), z);
        ans = 6;
      }
      x = tempz, y = tempx, z = tempy;
      if (start < pow(x, pow(y, z)) - 1e-7) {
        start = pow(x, pow(y, z));
        ans = 8;
      }
      if (start < pow(x, pow(z, y)) - 1e-7) {
        start = pow(x, pow(z, y));
        ans = 9;
      }
      if (start < pow(pow(x, y), z) - 1e-7) {
        start = pow(pow(x, y), z);
        ans = 10;
      }
    }
    switch (ans) {
      case 0:
        cout << "x^y^z" << endl;
        break;
      case 1:
        cout << "x^z^y" << endl;
        break;
      case 2:
        cout << "(x^y)^z" << endl;
        break;
      case 3:
        cout << "(x^z)^y" << endl;
        break;
      case 4:
        cout << "y^x^z" << endl;
        break;
      case 5:
        cout << "y^z^x" << endl;
        break;
      case 6:
        cout << "(y^x)^z" << endl;
        break;
      case 7:
        cout << "(y^z)^x" << endl;
        break;
      case 8:
        cout << "z^x^y" << endl;
        break;
      case 9:
        cout << "z^y^x" << endl;
        break;
      case 10:
        cout << "(z^x)^y" << endl;
        break;
      case 11:
        cout << "(z^y)^x" << endl;
        break;
    }
  }
  return 0;
}
