#include <bits/stdc++.h>
using namespace std;
string s[13] = {"",      "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^y)^x"};
double num[13];
const double INF = 1.0e36;
void solve(double x, double y, double z, int a, int b, int c) {
  double MAX = -INF, MIN = INF;
  int id;
  if (a == 1 && b == 1 && c == 1) {
    num[1] = z * log(y) + log(log(x));
    num[2] = y * log(z) + log(log(x));
    num[3] = log(z) + log(y) + log(log(x));
    num[4] = log(y) + log(z) + log(log(x));
    num[5] = z * log(x) + log(log(y));
    num[6] = x * log(z) + log(log(y));
    num[7] = log(z) + log(x) + log(log(y));
    num[8] = log(x) + log(z) + log(log(y));
    num[9] = y * log(x) + log(log(z));
    num[10] = x * log(y) + log(log(z));
    num[11] = log(x) + log(y) + log(log(z));
    num[12] = log(y) + log(x) + log(log(z));
    for (int i = 1; i <= 12; i++) {
      if (MAX < num[i]) {
        MAX = num[i];
        id = i;
      }
    }
  } else if (a == 0 && b == 1 && c == 1) {
    num[5] = z * log(x) + log(log(y));
    num[6] = x * log(z) + log(log(y));
    num[7] = log(z) + log(x) + log(log(y));
    num[8] = log(x) + log(z) + log(log(y));
    num[9] = y * log(x) + log(log(z));
    num[10] = x * log(y) + log(log(z));
    num[11] = log(x) + log(y) + log(log(z));
    num[12] = log(y) + log(x) + log(log(z));
    for (int i = 5; i <= 12; i++) {
      if (MAX < num[i]) {
        MAX = num[i];
        id = i;
      }
    }
  } else if (a == 1 && b == 0 && c == 1) {
    num[1] = z * log(y) + log(log(x));
    num[2] = y * log(z) + log(log(x));
    num[3] = log(z) + log(y) + log(log(x));
    num[4] = log(y) + log(z) + log(log(x));
    num[9] = y * log(x) + log(log(z));
    num[10] = x * log(y) + log(log(z));
    num[11] = log(x) + log(y) + log(log(z));
    num[12] = log(y) + log(x) + log(log(z));
    for (int i = 1; i <= 4; i++) {
      if (MAX < num[i]) {
        MAX = num[i];
        id = i;
      }
    }
    for (int i = 9; i <= 12; i++) {
      if (MAX < num[i]) {
        MAX = num[i];
        id = i;
      }
    }
  } else if (a == 1 && b == 1 && c == 0) {
    num[1] = z * log(y) + log(log(x));
    num[2] = y * log(z) + log(log(x));
    num[3] = log(z) + log(y) + log(log(x));
    num[4] = log(y) + log(z) + log(log(x));
    num[5] = z * log(x) + log(log(y));
    num[6] = x * log(z) + log(log(y));
    num[7] = log(z) + log(x) + log(log(y));
    num[8] = log(x) + log(z) + log(log(y));
    for (int i = 1; i <= 8; i++) {
      if (MAX < num[i]) {
        MAX = num[i];
        id = i;
      }
    }
  } else if (a == 1 && b == 0 && c == 0) {
    num[1] = z * log(y) + log(log(x));
    num[2] = y * log(z) + log(log(x));
    num[3] = log(z) + log(y) + log(log(x));
    num[4] = log(y) + log(z) + log(log(x));
    for (int i = 1; i <= 4; i++) {
      if (MAX < num[i]) {
        MAX = num[i];
        id = i;
      }
    }
  } else if (a == 0 && b == 1 && c == 0) {
    num[5] = z * log(x) + log(log(y));
    num[6] = x * log(z) + log(log(y));
    num[7] = log(z) + log(x) + log(log(y));
    num[8] = log(x) + log(z) + log(log(y));
    for (int i = 5; i <= 8; i++) {
      if (MAX < num[i]) {
        MAX = num[i];
        id = i;
      }
    }
  } else if (a == 0 && b == 0 && c == 1) {
    num[9] = y * log(x) + log(log(z));
    num[10] = x * log(y) + log(log(z));
    num[11] = log(x) + log(y) + log(log(z));
    num[12] = log(y) + log(x) + log(log(z));
    for (int i = 9; i <= 12; i++) {
      if (MAX < num[i]) {
        MAX = num[i];
        id = i;
      }
    }
  } else if (a == 0 && b == 0 && c == 0) {
    num[1] = z * log(y) + log(-log(x));
    num[2] = y * log(z) + log(-log(x));
    num[3] = log(z) + log(y) + log(-log(x));
    num[4] = log(y) + log(z) + log(-log(x));
    num[5] = z * log(x) + log(-log(y));
    num[6] = x * log(z) + log(-log(y));
    num[7] = log(z) + log(x) + log(-log(y));
    num[8] = log(x) + log(z) + log(-log(y));
    num[9] = y * log(x) + log(-log(z));
    num[10] = x * log(y) + log(-log(z));
    num[11] = log(x) + log(y) + log(-log(z));
    num[12] = log(y) + log(x) + log(-log(z));
    for (int i = 1; i <= 12; i++) {
      if (MIN > num[i]) {
        MIN = num[i];
        id = i;
      }
    }
  }
  cout << s[id] << endl;
}
int main() {
  double x, y, z;
  cin >> x >> y >> z;
  int xf = 1, yf = 1, zf = 1;
  if (x <= 1.0) xf = 0;
  if (y <= 1.0) yf = 0;
  if (z <= 1.0) zf = 0;
  solve(x, y, z, xf, yf, zf);
  return 0;
}
