#include <bits/stdc++.h>
using namespace std;
int main() {
  double x, y, z;
  cin >> x >> y >> z;
  double ninf = log(0);
  double a, b, c, d, e, f, g, h, i;
  double m;
  string res;
  if (log(x) < 0 && log(y) < 0 && log(z) < 0) {
    a = z * log(y) + log(-log(x));
    b = y * log(z) + log(-log(x));
    c = log(y * z * -log(x));
    d = z * log(x) + log(-log(y));
    e = x * log(z) + log(-log(y));
    f = log(x * z * -log(y));
    g = y * log(x) + log(-log(z));
    h = x * log(y) + log(-log(z));
    i = log(x * y * -log(z));
    m = a;
    res = "x^y^z";
    if (b < m) m = b, res = "x^z^y";
    if (c < m) m = c, res = "(x^y)^z";
    if (d < m) m = d, res = "y^x^z";
    if (e < m) m = e, res = "y^z^x";
    if (f < m) m = f, res = "(y^x)^z";
    if (g < m) m = g, res = "z^x^y";
    if (h < m) m = h, res = "z^y^x";
    if (i < m) m = i, res = "(z^x)^y";
    printf("%s\n", res.c_str());
  } else {
    if (log(x) >= 0) {
      a = z * log(y) + log(log(x));
      b = y * log(z) + log(log(x));
      c = log(y * z * log(x));
    }
    if (log(y) >= 0) {
      d = z * log(x) + log(log(y));
      e = x * log(z) + log(log(y));
      f = log(x * z * log(y));
    }
    if (log(z) >= 0) {
      g = y * log(x) + log(log(z));
      h = x * log(y) + log(log(z));
      i = log(x * y * log(z));
    }
    bool flag = 0;
    if (log(x) >= 0 && (a > m || !flag)) m = a, res = "x^y^z", flag = 1;
    if (log(x) >= 0 && (b > m || !flag)) m = b, res = "x^z^y", flag = 1;
    if (log(x) >= 0 && (c > m || !flag)) m = c, res = "(x^y)^z", flag = 1;
    if (log(y) >= 0 && (d > m || !flag)) m = d, res = "y^x^z", flag = 1;
    if (log(y) >= 0 && (e > m || !flag)) m = e, res = "y^z^x", flag = 1;
    if (log(y) >= 0 && (f > m || !flag)) m = f, res = "(y^x)^z", flag = 1;
    if (log(z) >= 0 && (g > m || !flag)) m = g, res = "z^x^y", flag = 1;
    if (log(z) >= 0 && (h > m || !flag)) m = h, res = "z^y^x", flag = 1;
    if (log(z) >= 0 && (i > m || !flag)) m = i, res = "(z^x)^y", flag = 1;
    printf("%s\n", res.c_str());
  }
}
