#include <bits/stdc++.h>
using namespace std;
long double loglog(long double x, long double y, long double z) {
  return z * log(y) + log(log(x));
}
long double loglog1(long double x, long double y, long double z) {
  return log(y) + log(z) + log(log(x));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long double x, y, z, val = -1000000000000000000;
  cin >> x >> y >> z;
  int side;
  if (x < 1 && y < 1 && z < 1)
    side = -1;
  else if (x > 1 && y > 1 && z > 1)
    side = 1;
  else
    side = 0;
  int ind;
  if (side == 1) {
    if (val < loglog(x, y, z)) {
      ind = 1;
      val = loglog(x, y, z);
    }
    if (val < loglog(x, z, y)) {
      ind = 2;
      val = loglog(x, z, y);
    }
    if (val < loglog1(x, y, z)) {
      ind = 3;
      val = loglog1(x, y, z);
    }
    if (val < loglog(y, x, z)) {
      ind = 5;
      val = loglog(y, x, z);
    }
    if (val < loglog(y, z, x)) {
      ind = 6;
      val = loglog(y, z, x);
    }
    if (val < loglog1(y, x, z)) {
      ind = 7;
      val = loglog1(y, x, z);
    }
    if (val < loglog(z, x, y)) {
      ind = 9;
      val = loglog(z, x, y);
    }
    if (val < loglog(z, y, x)) {
      ind = 10;
      val = loglog(z, y, x);
    }
    if (val < loglog1(z, x, y)) {
      ind = 11;
      val = loglog1(z, x, y);
    }
  }
  if (side == 0) {
    if (x > 1) {
      if (val < loglog(x, y, z)) {
        ind = 1;
        val = loglog(x, y, z);
      }
      if (val < loglog(x, z, y)) {
        ind = 2;
        val = loglog(x, z, y);
      }
      if (val < loglog1(x, y, z)) {
        ind = 3;
        val = loglog1(x, y, z);
      }
    }
    if (y > 1) {
      if (val < loglog(y, x, z)) {
        ind = 5;
        val = loglog(y, x, z);
      }
      if (val < loglog(y, z, x)) {
        ind = 6;
        val = loglog(y, z, x);
      }
      if (val < loglog1(y, x, z)) {
        ind = 7;
        val = loglog1(y, x, z);
      }
    }
    if (z > 1) {
      if (val < loglog(z, x, y)) {
        ind = 9;
        val = loglog(z, x, y);
      }
      if (val < loglog(z, y, x)) {
        ind = 10;
        val = loglog(z, y, x);
      }
      if (val < loglog1(z, x, y)) {
        ind = 11;
        val = loglog1(z, x, y);
      }
    }
    if (max(x, max(y, z)) == 1) {
      if (x == 1) {
        ind = 1;
        val = 1;
      }
      if (y == 1 && val < 1) {
        ind = 5;
        val = 1;
      }
      if (z == 1 && val < 1) {
        ind = 9;
        val = 1;
      }
    }
  }
  if (side == -1) {
    val = 1000000000000000000;
    x = 1 / x;
    if (val > loglog(x, y, z)) {
      ind = 1;
      val = loglog(x, y, z);
    }
    if (val > loglog(x, z, y)) {
      ind = 2;
      val = loglog(x, z, y);
    }
    if (val > loglog1(x, y, z)) {
      ind = 3;
      val = loglog1(x, y, z);
    }
    x = 1 / x;
    y = 1 / y;
    if (val > loglog(y, x, z)) {
      ind = 5;
      val = loglog(y, x, z);
    }
    if (val > loglog(y, z, x)) {
      ind = 6;
      val = loglog(y, z, x);
    }
    if (val > loglog1(y, x, z)) {
      ind = 7;
      val = loglog1(y, x, z);
    }
    y = 1 / y;
    z = 1 / z;
    if (val > loglog(z, x, y)) {
      ind = 9;
      val = loglog(z, x, y);
    }
    if (val > loglog(z, y, x)) {
      ind = 10;
      val = loglog(z, y, x);
    }
    if (val > loglog1(z, x, y)) {
      ind = 11;
      val = loglog1(z, x, y);
    }
    z = 1 / z;
  }
  if (ind == 1) {
    cout << "x^y^z" << endl;
  }
  if (ind == 2) {
    cout << "x^z^y" << endl;
  }
  if (ind == 3) {
    cout << "(x^y)^z" << endl;
  }
  if (ind == 5) {
    cout << "y^x^z" << endl;
  }
  if (ind == 6) {
    cout << "y^z^x" << endl;
  }
  if (ind == 7) {
    cout << "(y^x)^z" << endl;
  }
  if (ind == 9) {
    cout << "z^x^y" << endl;
  }
  if (ind == 10) {
    cout << "z^y^x" << endl;
  }
  if (ind == 11) {
    cout << "(z^x)^y" << endl;
  }
  return 0;
}
