#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int Scan() {
  int res = 0, ch, flag = 0;
  if ((ch = getchar()) == '-')
    flag = 1;
  else if (ch >= '0' && ch <= '9')
    res = ch - '0';
  while ((ch = getchar()) >= '0' && ch <= '9') res = res * 10 + ch - '0';
  return flag ? -res : res;
}
pair<double, int> cmp(double x, double y, double z, int id) {
  if (z * log10(y) >= y * log10(z) &&
      z * log10(y) >= (double)(log10(z) + log10(y)))
    return make_pair(z * log10(y) + log10(log10(x)), 1 + id);
  if (y * log10(z) >= z * log10(y) &&
      y * log10(z) >= (double)(log10(z) + log10(y)))
    return make_pair(y * log10(z) + log10(log10(x)), 2 + id);
  if ((double)(log10(z) + log10(y)) >= z * log10(y) &&
      (log10(z) + log10(y)) >= y * log10(z))
    return make_pair((log10(z) + log10(y)) + log10(log10(x)), 3 + id);
}
int cmp2(pair<double, int> p1, pair<double, int> p2, pair<double, int> p3) {
  if (p1.first >= p2.first && p1.first >= p3.first) return p1.second;
  if (p2.first >= p1.first && p2.first >= p3.first) return p2.second;
  if (p3.first >= p1.first && p3.first >= p2.first) return p3.second;
}
pair<double, int> cmp3(double x, double y, double z, int id) {
  if (z * log10(y) <= y * log10(z) &&
      z * log10(y) <= (double)(log10(z) + log10(y)))
    return make_pair(z * log10(y) + log10(log10(x)), 1 + id);
  if (y * log10(z) <= z * log10(y) &&
      y * log10(z) <= (double)(log10(z) + log10(y)))
    return make_pair(y * log10(z) + log10(log10(x)), 2 + id);
  if ((double)(log10(z) + log10(y)) <= z * log10(y) &&
      (log10(z) + log10(y)) <= y * log10(z))
    return make_pair((log10(z) + log10(y)) + log10(log10(x)), 3 + id);
}
int cmp4(pair<double, int> p1, pair<double, int> p2, pair<double, int> p3) {
  if (p1.first <= p2.first && p1.first <= p3.first) return p1.second;
  if (p2.first <= p1.first && p2.first <= p3.first) return p2.second;
  if (p3.first <= p1.first && p3.first <= p2.first) return p3.second;
}
void show1(char x, char y, char z) { printf("%c^%c^%c\n", x, y, z); }
void show2(char x, char y, char z) { printf("(%c^%c)^%c", x, y, z); }
int main() {
  double x, y, z;
  cin >> x >> y >> z;
  if (x > 1 && y > 1 && z > 1) {
    pair<double, int> p1 = cmp(x, y, z, 0);
    pair<double, int> p2 = cmp(y, x, z, 4);
    pair<double, int> p3 = cmp(z, x, y, 8);
    int res = cmp2(p1, p2, p3);
    switch (res) {
      case 1:
        show1('x', 'y', 'z');
        break;
      case 2:
        show1('x', 'z', 'y');
        break;
      case 3:
        show2('x', 'y', 'z');
        break;
      case 4:
        show2('x', 'z', 'y');
        break;
      case 5:
        show1('y', 'x', 'z');
        break;
      case 6:
        show1('y', 'z', 'x');
        break;
      case 7:
        show2('y', 'x', 'z');
        break;
      case 8:
        show2('y', 'z', 'x');
        break;
      case 9:
        show1('z', 'x', 'y');
        break;
      case 10:
        show1('z', 'y', 'x');
        break;
      case 11:
        show2('z', 'x', 'y');
        break;
      case 12:
        show2('z', 'y', 'x');
        break;
    }
  } else if (x > 1 && y > 1) {
    pair<double, int> p1 = cmp(x, y, z, 0);
    pair<double, int> p2 = cmp(y, x, z, 4);
    int res = p1.first > p2.first ? p1.second : p2.second;
    if (fabs(p1.first - p2.first) < 1e-9) res = p1.second;
    switch (res) {
      case 1:
        show1('x', 'y', 'z');
        break;
      case 2:
        show1('x', 'z', 'y');
        break;
      case 3:
        show2('x', 'y', 'z');
        break;
      case 4:
        show2('x', 'z', 'y');
        break;
      case 5:
        show1('y', 'x', 'z');
        break;
      case 6:
        show1('y', 'z', 'x');
        break;
      case 7:
        show2('y', 'x', 'z');
        break;
      case 8:
        show2('y', 'z', 'x');
        break;
      case 9:
        show1('z', 'x', 'y');
        break;
      case 10:
        show1('z', 'y', 'x');
        break;
      case 11:
        show2('z', 'x', 'y');
        break;
      case 12:
        show2('z', 'y', 'x');
        break;
    }
  } else if (y > 1 && z > 1) {
    pair<double, int> p2 = cmp(y, x, z, 4);
    pair<double, int> p3 = cmp(z, x, y, 8);
    int res = p2.first >= p3.first ? p2.second : p3.second;
    if (fabs(p2.first - p3.first) < 1e-9) res = p2.second;
    switch (res) {
      case 1:
        show1('x', 'y', 'z');
        break;
      case 2:
        show1('x', 'z', 'y');
        break;
      case 3:
        show2('x', 'y', 'z');
        break;
      case 4:
        show2('x', 'z', 'y');
        break;
      case 5:
        show1('y', 'x', 'z');
        break;
      case 6:
        show1('y', 'z', 'x');
        break;
      case 7:
        show2('y', 'x', 'z');
        break;
      case 8:
        show2('y', 'z', 'x');
        break;
      case 9:
        show1('z', 'x', 'y');
        break;
      case 10:
        show1('z', 'y', 'x');
        break;
      case 11:
        show2('z', 'x', 'y');
        break;
      case 12:
        show2('z', 'y', 'x');
        break;
    }
  } else if (x > 1 && z > 1) {
    pair<double, int> p1 = cmp(x, y, z, 0);
    pair<double, int> p3 = cmp(z, x, y, 8);
    int res = p1.first >= p3.first ? p1.second : p3.second;
    if (fabs(p1.first - p3.first) < 1e-9) res = p1.second;
    switch (res) {
      case 1:
        show1('x', 'y', 'z');
        break;
      case 2:
        show1('x', 'z', 'y');
        break;
      case 3:
        show2('x', 'y', 'z');
        break;
      case 4:
        show2('x', 'z', 'y');
        break;
      case 5:
        show1('y', 'x', 'z');
        break;
      case 6:
        show1('y', 'z', 'x');
        break;
      case 7:
        show2('y', 'x', 'z');
        break;
      case 8:
        show2('y', 'z', 'x');
        break;
      case 9:
        show1('z', 'x', 'y');
        break;
      case 10:
        show1('z', 'y', 'x');
        break;
      case 11:
        show2('z', 'x', 'y');
        break;
      case 12:
        show2('z', 'y', 'x');
        break;
    }
  } else if (x > 1) {
    pair<double, int> p1 = cmp(x, y, z, 0);
    int res = p1.second;
    switch (res) {
      case 1:
        show1('x', 'y', 'z');
        break;
      case 2:
        show1('x', 'z', 'y');
        break;
      case 3:
        show2('x', 'y', 'z');
        break;
      case 4:
        show2('x', 'z', 'y');
        break;
      case 5:
        show1('y', 'x', 'z');
        break;
      case 6:
        show1('y', 'z', 'x');
        break;
      case 7:
        show2('y', 'x', 'z');
        break;
      case 8:
        show2('y', 'z', 'x');
        break;
      case 9:
        show1('z', 'x', 'y');
        break;
      case 10:
        show1('z', 'y', 'x');
        break;
      case 11:
        show2('z', 'x', 'y');
        break;
      case 12:
        show2('z', 'y', 'x');
        break;
    }
  } else if (y > 1) {
    pair<double, int> p2 = cmp(y, x, z, 4);
    int res = p2.second;
    switch (res) {
      case 1:
        show1('x', 'y', 'z');
        break;
      case 2:
        show1('x', 'z', 'y');
        break;
      case 3:
        show2('x', 'y', 'z');
        break;
      case 4:
        show2('x', 'z', 'y');
        break;
      case 5:
        show1('y', 'x', 'z');
        break;
      case 6:
        show1('y', 'z', 'x');
        break;
      case 7:
        show2('y', 'x', 'z');
        break;
      case 8:
        show2('y', 'z', 'x');
        break;
      case 9:
        show1('z', 'x', 'y');
        break;
      case 10:
        show1('z', 'y', 'x');
        break;
      case 11:
        show2('z', 'x', 'y');
        break;
      case 12:
        show2('z', 'y', 'x');
        break;
    }
  } else if (z > 1) {
    pair<double, int> p3 = cmp(z, x, y, 8);
    int res = p3.second;
    switch (res) {
      case 1:
        show1('x', 'y', 'z');
        break;
      case 2:
        show1('x', 'z', 'y');
        break;
      case 3:
        show2('x', 'y', 'z');
        break;
      case 4:
        show2('x', 'z', 'y');
        break;
      case 5:
        show1('y', 'x', 'z');
        break;
      case 6:
        show1('y', 'z', 'x');
        break;
      case 7:
        show2('y', 'x', 'z');
        break;
      case 8:
        show2('y', 'z', 'x');
        break;
      case 9:
        show1('z', 'x', 'y');
        break;
      case 10:
        show1('z', 'y', 'x');
        break;
      case 11:
        show2('z', 'x', 'y');
        break;
      case 12:
        show2('z', 'y', 'x');
        break;
    }
  } else if (x == 1) {
    int res = 1;
    switch (res) {
      case 1:
        show1('x', 'y', 'z');
        break;
      case 2:
        show1('x', 'z', 'y');
        break;
      case 3:
        show2('x', 'y', 'z');
        break;
      case 4:
        show2('x', 'z', 'y');
        break;
      case 5:
        show1('y', 'x', 'z');
        break;
      case 6:
        show1('y', 'z', 'x');
        break;
      case 7:
        show2('y', 'x', 'z');
        break;
      case 8:
        show2('y', 'z', 'x');
        break;
      case 9:
        show1('z', 'x', 'y');
        break;
      case 10:
        show1('z', 'y', 'x');
        break;
      case 11:
        show2('z', 'x', 'y');
        break;
      case 12:
        show2('z', 'y', 'x');
        break;
    }
  } else if (y == 1) {
    int res = 5;
    switch (res) {
      case 1:
        show1('x', 'y', 'z');
        break;
      case 2:
        show1('x', 'z', 'y');
        break;
      case 3:
        show2('x', 'y', 'z');
        break;
      case 4:
        show2('x', 'z', 'y');
        break;
      case 5:
        show1('y', 'x', 'z');
        break;
      case 6:
        show1('y', 'z', 'x');
        break;
      case 7:
        show2('y', 'x', 'z');
        break;
      case 8:
        show2('y', 'z', 'x');
        break;
      case 9:
        show1('z', 'x', 'y');
        break;
      case 10:
        show1('z', 'y', 'x');
        break;
      case 11:
        show2('z', 'x', 'y');
        break;
      case 12:
        show2('z', 'y', 'x');
        break;
    }
  } else if (z == 1) {
    int res = 9;
    switch (res) {
      case 1:
        show1('x', 'y', 'z');
        break;
      case 2:
        show1('x', 'z', 'y');
        break;
      case 3:
        show2('x', 'y', 'z');
        break;
      case 4:
        show2('x', 'z', 'y');
        break;
      case 5:
        show1('y', 'x', 'z');
        break;
      case 6:
        show1('y', 'z', 'x');
        break;
      case 7:
        show2('y', 'x', 'z');
        break;
      case 8:
        show2('y', 'z', 'x');
        break;
      case 9:
        show1('z', 'x', 'y');
        break;
      case 10:
        show1('z', 'y', 'x');
        break;
      case 11:
        show2('z', 'x', 'y');
        break;
      case 12:
        show2('z', 'y', 'x');
        break;
    }
  } else {
    pair<double, int> p1 = cmp3(1 / x, y, z, 0);
    pair<double, int> p2 = cmp3(1 / y, x, z, 4);
    pair<double, int> p3 = cmp3(1 / z, x, y, 8);
    int res = cmp4(p1, p2, p3);
    switch (res) {
      case 1:
        show1('x', 'y', 'z');
        break;
      case 2:
        show1('x', 'z', 'y');
        break;
      case 3:
        show2('x', 'y', 'z');
        break;
      case 4:
        show2('x', 'z', 'y');
        break;
      case 5:
        show1('y', 'x', 'z');
        break;
      case 6:
        show1('y', 'z', 'x');
        break;
      case 7:
        show2('y', 'x', 'z');
        break;
      case 8:
        show2('y', 'z', 'x');
        break;
      case 9:
        show1('z', 'x', 'y');
        break;
      case 10:
        show1('z', 'y', 'x');
        break;
      case 11:
        show2('z', 'x', 'y');
        break;
      case 12:
        show2('z', 'y', 'x');
        break;
    }
  }
  return 0;
}
