#include <bits/stdc++.h>
using namespace std;
int init() {
  ios_base::sync_with_stdio(0);
  srand(time(NULL));
  return 0;
}
int initializer = init();
template <typename T1, typename T2>
istream &operator>>(istream &is, pair<T1, T2> &p) {
  is >> p.first >> p.second;
  return is;
}
template <typename T>
istream &operator>>(istream &is, vector<T> &p) {
  for (int i = 0; i < p.size(); i++) is >> p[i];
  return is;
}
class inputer {
 private:
  istream *istr;

 public:
  inputer(istream &is) : istr(&is) {}
  template <typename T>
  void get(T &n) {
    (*istr) >> n;
  }
  template <typename T, typename... Args>
  void get(T &n, Args &...args) {
    get(n);
    get(args...);
  }
  template <typename... Args>
  void getln(Args &...args) {
    get(args...);
    ln();
  }
  template <typename T>
  operator T() {
    T n;
    get(n);
    return n;
  }
  void ln() {
    string s;
    getline(cin, s);
  }
  template <typename T>
  void getv(vector<T> &v, int size) {
    v.resize(size);
    (*istr) >> v;
  }
};
string delim = " ";
template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &p) {
  os << p.first << delim << p.second;
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &p) {
  for (int i = 0; i < p.size(); i++) {
    if (i != 0) os << delim;
    os << p[i];
  }
  return os;
}
class outputer {
 private:
  ostream *ostr;

 public:
  outputer(ostream &os) : ostr(&os) {}
  template <typename T>
  void put(const T &n) {
    (*ostr) << n;
  }
  template <typename T, typename... Args>
  void put(const T &n, const Args &...args) {
    put(n);
    put(args...);
  }
  template <typename... Args>
  void putln(const Args &...args) {
    put(args...);
    ln();
  }
  template <typename T>
  outputer &operator=(const T &n) {
    put(n);
    return *this;
  }
  void ln() { (*ostr) << "\n"; }
  template <typename T>
  void putv(vector<T> v, int size) {
    for (int i = 0; i < size; i++) {
      if (i != 0) (*ostr) << delim;
      (*ostr) << v[i];
    }
  }
};
inputer in(cin);
outputer out(cout);
bool will_it_be_AC() {
  return true;
  ;
}
int get_my_rating() { return 2016; }
bool prime(long long n) {
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
vector<long long> divs(long long n) {
  vector<long long> v;
  long long i = 2;
  while (i * i <= n)
    if (n % i == 0) {
      n /= i;
      v.push_back(i);
    } else
      i++;
  v.push_back(n);
  return v;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long extgcd(long long a, long long b, long long &x, long long &y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  long long x1, y1, d = extgcd(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return d;
}
template <typename T>
class fenwick {
 private:
  vector<T> t;
  int n;

 public:
  fenwick(int nn) { init(nn); }
  void init(int nn) {
    n = nn;
    t.assign(n, 0);
  }
  T sum(int r) {
    T result = 0;
    for (; r >= 0; r = (r & (r + 1)) - 1) result += t[r];
    return result;
  }
  void inc(int i, T delta) {
    for (; i < n; i = (i | (i + 1))) t[i] += delta;
  }
  T sum(int l, int r) { return sum(r) - sum(l - 1); }
  T get(int i) { return sum(i, i); }
  void put(int i, T v) { inc(i, v - sum(i, i)); }
  int size() { return n; }
};
bool cmp(pair<long double, int> a, pair<long double, int> b) {
  if (abs(a.first - b.first) <= 1e-7)
    return a.second < b.second;
  else
    return a.first > b.first;
}
const string a[12] = {"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"};
int main() {
  long double x = in, y = in, z = in, lgx = log(x), lgy = log(y), lgz = log(z);
  vector<pair<long double, int> > v;
  v.push_back({lgx * pow(y, z), 0});
  v.push_back({lgx * pow(z, y), 1});
  v.push_back({lgx * y * z, 2});
  v.push_back({lgx * z * y, 3});
  v.push_back({lgy * pow(x, z), 4});
  v.push_back({lgy * pow(z, x), 5});
  v.push_back({lgy * x * z, 6});
  v.push_back({lgy * z * x, 7});
  v.push_back({lgz * pow(x, y), 8});
  v.push_back({lgz * pow(y, x), 9});
  v.push_back({lgz * x * y, 10});
  v.push_back({lgz * y * x, 11});
  sort(v.begin(), v.end(), cmp);
  out = a[v[0].second];
  return 0;
}
