#include <bits/stdc++.h>
using namespace std;
double a[15];
void print(int p) {
  if (p == 1)
    printf("x^y^z");
  else if (p == 2)
    printf("x^z^y");
  else if (p == 3)
    printf("(x^y)^z");
  else if (p == 4)
    printf("(x^z)^y");
  else if (p == 5)
    printf("y^x^z");
  else if (p == 6)
    printf("y^z^x");
  else if (p == 7)
    printf("(y^x)^z");
  else if (p == 8)
    printf("(y^z)^x");
  else if (p == 9)
    printf("z^x^y");
  else if (p == 10)
    printf("z^y^x");
  else if (p == 11)
    printf("(z^x)^y");
  else
    printf("(z^y)^x");
}
int main() {
  double x, y, z;
  scanf("%lf%lf%lf", &x, &y, &z);
  if (log(x) < -1e-10 && log(y) < -1e-10 && log(z) < -1e-10) {
    a[1] = z * log(y) + log(-log(x));
    a[2] = y * log(z) + log(-log(x));
    a[3] = log(y) + log(z) + log(-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) + log(z) + log(-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) + log(y) + log(-log(z));
    a[12] = a[11];
    double s = 1000000000.0;
    for (int i = 1; i <= 12; i++) {
      s = min(s, a[i]);
    }
    for (int i = 1; i <= 12; i++) {
      if (fabs(s - a[i]) < 1e-10) {
        print(i);
        return 0;
      }
    }
  } else {
    if (log(x) < -1e-10) {
      double s = max(log(x), log(y));
      s = max(s, log(z));
      if (fabs(s) < 1e-10) {
        if (fabs(log(y)) < 1e-10) {
          print(5);
        } else {
          print(9);
        }
        return 0;
      }
      for (int i = 1; i <= 12; i++) a[i] = -1000000000.0;
      if (log(y) > 1e-10) {
        a[5] = z * log(x) + log(log(y));
        a[6] = x * log(z) + log(log(y));
        a[7] = log(x) + log(z) + log(log(y));
        a[8] = a[7];
      }
      if (log(z) > 1e-10) {
        a[9] = y * log(x) + log(log(z));
        a[10] = x * log(y) + log(log(z));
        a[11] = log(x) + log(y) + log(log(z));
        a[12] = a[11];
      }
      s = -1000000000.0;
      for (int i = 1; i <= 12; i++) {
        s = max(s, a[i]);
      }
      for (int i = 1; i <= 12; i++) {
        if (fabs(s - a[i]) < 1e-10) {
          print(i);
          return 0;
        }
      }
    } else {
      double s = max(log(x), log(y));
      s = max(s, log(z));
      if (fabs(s) < 1e-10) {
        if (fabs(log(x)) < 1e-10) {
          print(1);
        } else if (fabs(log(y)) < 1e-10) {
          print(5);
        } else
          print(9);
        return 0;
      }
      for (int i = 1; i <= 12; i++) a[i] = -1000000000.0;
      a[1] = z * log(y) + log(log(x));
      a[2] = y * log(z) + log(log(x));
      a[3] = log(y) + log(z) + log(log(x));
      a[4] = a[3];
      if (log(y) > 1e-10) {
        a[5] = z * log(x) + log(log(y));
        a[6] = x * log(z) + log(log(y));
        a[7] = log(x) + log(z) + log(log(y));
        a[8] = a[7];
      }
      if (log(z) > 1e-10) {
        a[9] = y * log(x) + log(log(z));
        a[10] = x * log(y) + log(log(z));
        a[11] = log(x) + log(y) + log(log(z));
        a[12] = a[11];
      }
      s = -1000000000.0;
      for (int i = 1; i <= 12; i++) {
        s = max(s, a[i]);
      }
      for (int i = 1; i <= 12; i++) {
        if (fabs(s - a[i]) < 1e-10) {
          print(i);
          return 0;
        }
      }
    }
  }
}
