#include <bits/stdc++.h>
using namespace std;
string s[14];
double a[14];
vector<double> V;
int main() {
  int i, in;
  double m;
  s[1] = "x^y^z";
  s[2] = "x^z^y";
  s[3] = "(x^y)^z";
  s[5] = "y^x^z";
  s[6] = "y^z^x";
  s[7] = "(y^x)^z";
  s[9] = "z^x^y";
  s[10] = "z^y^x";
  s[11] = "(z^x)^y";
  double x, y, z;
  cin >> x >> y >> z;
  V.push_back(x);
  V.push_back(y);
  V.push_back(z);
  sort(V.begin(), V.end());
  if (V[1] <= 1) {
    a[1] = pow(x, pow(y, z));
    a[2] = pow(x, pow(z, y));
    a[3] = pow(pow(x, y), z);
    a[4] = a[3];
    a[5] = pow(y, pow(x, z));
    a[6] = pow(y, pow(z, x));
    a[7] = pow(pow(y, x), z);
    a[8] = a[7];
    a[9] = pow(z, pow(x, y));
    a[10] = pow(z, pow(y, x));
    a[11] = pow(pow(z, y), x);
    a[12] = a[11];
    in = 1;
    m = a[1];
    for (i = 2; i <= 12; i++) {
      if (a[i] > m) {
        m = a[i];
        in = i;
      }
    }
    cout << s[in];
    return 0;
  }
  if (V[0] > 1) {
    a[1] = z * log(y) + log(log(x));
    a[2] = y * log(z) + log(log(x));
    a[3] = log(y * z * log(x));
    a[4] = a[3];
    a[5] = z * log(x) + log(log(y));
    a[6] = x * log(z) + log(log(y));
    a[7] = log(x * z * log(y));
    a[8] = a[7];
    a[9] = y * log(x) + log(log(z));
    a[10] = x * log(y) + log(log(z));
    a[11] = log(x * y * log(z));
    a[12] = a[11];
    in = 1;
    m = a[1];
    for (i = 2; i <= 12; i++) {
      if (a[i] > m) {
        m = a[i];
        in = i;
      }
    }
    cout << s[in];
    return 0;
  }
  if (x <= 1) {
    a[5] = z * log(x) + log(log(y));
    a[6] = x * log(z) + log(log(y));
    a[7] = log(x * z * log(y));
    a[8] = a[7];
    a[9] = y * log(x) + log(log(z));
    a[10] = x * log(y) + log(log(z));
    a[11] = log(x * y * log(z));
    a[12] = a[11];
    in = 5;
    m = a[5];
    for (i = 6; i <= 12; i++) {
      if (a[i] > m) {
        m = a[i];
        in = i;
      }
    }
    cout << s[in];
    return 0;
  }
  if (y <= 1) {
    a[1] = z * log(y) + log(log(x));
    a[2] = y * log(z) + log(log(x));
    a[3] = log(y * z * log(x));
    a[4] = a[3];
    a[9] = y * log(x) + log(log(z));
    a[10] = x * log(y) + log(log(z));
    a[11] = log(x * y * log(z));
    a[12] = a[11];
    in = 1;
    m = a[1];
    for (i = 2; i <= 4; i++) {
      if (a[i] > m) {
        m = a[i];
        in = i;
      }
    }
    for (i = 9; i <= 12; i++) {
      if (a[i] > m) {
        m = a[i];
        in = i;
      }
    }
    cout << s[in];
    return 0;
  }
  if (z <= 1) {
    a[1] = z * log(y) + log(log(x));
    a[2] = y * log(z) + log(log(x));
    a[3] = log(y * z * log(x));
    a[4] = a[3];
    a[5] = z * log(x) + log(log(y));
    a[6] = x * log(z) + log(log(y));
    a[7] = log(x * z * log(y));
    a[8] = a[7];
    in = 1;
    m = a[1];
    for (i = 2; i <= 8; i++) {
      if (a[i] > m) {
        m = a[i];
        in = i;
      }
    }
    cout << s[in];
    return 0;
  }
  return 0;
}
