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int sgn(double x) {
  if (fabs(x) < 1e-6) return 0;
  return x > 0 ? 1 : -1;
}
void Pre() {
  b[1] = x;
  b[2] = y;
  b[3] = z;
  c[1] = 'x';
  c[2] = 'y';
  c[3] = 'z';
  biao[1][1] = 3;
  biao[1][2] = 2;
  biao[1][3] = 1;
  biao[2][1] = 2;
  biao[2][2] = 3;
  biao[2][3] = 1;
  biao[3][1] = 2;
  biao[3][2] = 3;
  biao[3][3] = 1;
  biao[5][1] = 3;
  biao[5][2] = 1;
  biao[5][3] = 2;
  biao[6][1] = 1;
  biao[6][2] = 3;
  biao[6][3] = 2;
  biao[7][1] = 1;
  biao[7][2] = 3;
  biao[7][3] = 2;
  biao[9][1] = 2;
  biao[9][2] = 1;
  biao[9][3] = 3;
  biao[10][1] = 1;
  biao[10][2] = 2;
  biao[10][3] = 3;
  biao[11][1] = 2;
  biao[11][2] = 1;
  biao[11][3] = 3;
  bi[1][1] = 1;
  bi[1][2] = 2;
  bi[1][3] = 3;
  bi[2][1] = 1;
  bi[2][2] = 3;
  bi[2][3] = 2;
  bi[3][1] = 1;
  bi[3][2] = 2;
  bi[3][3] = 3;
  bi[5][1] = 2;
  bi[5][2] = 1;
  bi[5][3] = 3;
  bi[6][1] = 2;
  bi[6][2] = 3;
  bi[6][3] = 1;
  bi[7][1] = 2;
  bi[7][2] = 1;
  bi[7][3] = 3;
  bi[9][1] = 3;
  bi[9][2] = 1;
  bi[9][3] = 2;
  bi[10][1] = 3;
  bi[10][2] = 2;
  bi[10][3] = 1;
  bi[11][1] = 3;
  bi[11][2] = 1;
  bi[11][3] = 2;
}
double suan1(int id) {
  double l = log(b[biao[id][1]]) + log(b[biao[id][2]]);
  double r = log(b[biao[id][3]]);
  if (sgn(r) < 0) {
    vis[id] = 1;
    return 1;
  }
  r = log(r);
  return l + r;
}
double suan2(int id) {
  double l = b[biao[id][1]] * (log(b[biao[id][2]]));
  double r = log(b[biao[id][3]]);
  if (sgn(r) < 0) {
    vis[id] = 1;
    return 1;
  }
  r = log(r);
  return l + r;
}
double suan01(int id) {
  double l = log(b[biao[id][1]]) + log(b[biao[id][2]]);
  double r = log(1.0 / b[biao[id][3]]);
  r = log(r);
  return 1.0 / (l + r);
}
double suan02(int id) {
  double l = b[biao[id][1]] * (log(b[biao[id][2]]));
  double r = log(1.0 / (b[biao[id][3]]));
  r = log(r);
  return 1.0 / (l + r);
}
void solve() {
  double L, R;
  int lb, ub;
  if (x > 1 && y > 1 && z > 1) {
    for (int i = 1; i <= 12; i++) {
      if (i == 4 || i == 8 || i == 12)
        continue;
      else if (i == 3 || i == 7 || i == 11) {
        a[i] = suan1(i);
      } else {
        a[i] = suan2(i);
      }
    }
    L = a[3];
    lb = 3;
    R = a[1];
    ub = 1;
    for (int i = 1; i <= 12; i++) {
      if (i == 4 || i == 8 || i == 12)
        continue;
      else if (i == 3 || i == 7 || i == 11) {
        if (sgn(a[i] - L) > 0) {
          L = max(L, a[i]);
          lb = i;
        }
      } else {
        if (sgn(a[i] - R) > 0) {
          R = max(R, a[i]);
          ub = i;
        }
      }
    }
    if (sgn(L - R) > 0) {
      printf("(%c^%c)^%c\n", c[bi[lb][1]], c[bi[lb][2]], c[bi[lb][3]]);
      return;
    }
    printf("%c^%c^%c\n", c[bi[ub][1]], c[bi[ub][2]], c[bi[ub][3]]);
  } else if (x < 1 && y < 1 && z < 1) {
    for (int i = 1; i <= 12; i++) {
      if (i == 4 || i == 8 || i == 12)
        continue;
      else if (i == 3 || i == 7 || i == 11) {
        a[i] = suan01(i);
      } else {
        a[i] = suan02(i);
      }
    }
    L = a[3];
    lb = 3;
    R = a[1];
    ub = 1;
    for (int i = 1; i <= 12; i++) {
      if (i == 4 || i == 8 || i == 12)
        continue;
      else if (i == 3 || i == 7 || i == 11) {
        if (sgn(a[i] - L) > 0) {
          L = min(L, a[i]);
          lb = i;
        }
      } else {
        if (sgn(a[i] - R) > 0) {
          R = min(R, a[i]);
          ub = i;
        }
      }
    }
    if (sgn(L - R) < 0) {
      printf("(%c^%c)^%c\n", c[bi[lb][1]], c[bi[lb][2]], c[bi[lb][3]]);
      return;
    }
    printf("%c^%c^%c\n", c[bi[ub][1]], c[bi[ub][2]], c[bi[ub][3]]);
  } else {
    for (int i = 1; i <= 12; i++) {
      if (i == 4 || i == 8 || i == 12)
        continue;
      else if (i == 3 || i == 7 || i == 11) {
        a[i] = suan1(i);
      } else {
        a[i] = suan2(i);
      }
    }
    int okl = 0;
    for (int i = 1; i <= 12; i++) {
      if (i == 3 || i == 7 || i == 11) {
        if (vis[i] == 0) {
          L = a[i];
          okl = 1;
          lb = i;
          break;
        }
      }
    }
    int okr = 0;
    for (int i = 1; i <= 12; i++) {
      if (i == 1 || i == 2 || i == 5 || i == 6 || i == 9 || i == 10) {
        if (vis[i] == 0) {
          R = a[i];
          okr = 1;
          ub = i;
          break;
        }
      }
    }
    if (okl == 0) {
      printf("(%c^%c)^%c\n", c[bi[ub][1]], c[bi[ub][2]], c[bi[ub][3]]);
    } else if (okr == 0) {
      printf("(%c^%c)^%c\n", c[bi[lb][1]], c[bi[lb][2]], c[bi[lb][3]]);
    } else {
      for (int i = 1; i <= 12; i++) {
        if (i == 4 || i == 8 || i == 12 || vis[i])
          continue;
        else if (i == 3 || i == 7 || i == 11) {
          if (sgn(a[i] - L) > 0) {
            L = max(L, a[i]);
            lb = i;
          }
        } else {
          if (sgn(a[i] - R) > 0) {
            R = max(R, a[i]);
            ub = i;
          }
        }
      }
      if (sgn(L - R) > 0) {
        printf("(%c^%c)^%c\n", c[bi[lb][1]], c[bi[lb][2]], c[bi[lb][3]]);
        return;
      }
      printf("%c^%c^%c\n", c[bi[ub][1]], c[bi[ub][2]], c[bi[ub][3]]);
    }
  }
}
int main() {
  while (scanf("%lf %lf %lf", &x, &y, &z) != EOF) {
    Pre();
    memset(vis, 0, sizeof(vis));
    solve();
  }
  return 0;
}
