#include <bits/stdc++.h>
using namespace std;
int main() {
  ios ::sync_with_stdio(false);
  cin.tie(0);
  long long int a, b, c, d, e, g, h, l, m, n, o, p, q, r, s, t, u, v, w, x, y,
      z;
  long long int i, j, ct = 0, f = 0, k = 0, max = 0, min = 999999999999999999;
  long long int A, B, C, D, E, F, G, H, J, K, L, M, N, O, P, Q, R, S, T, U, V,
      W, X, Y, Z;
  char ch, ch1, ch2;
  double d1, d2, d3;
  string st, st1;
  map<string, int> ma;
  vector<int> ve, ve1;
  vector<int>::iterator I;
  long long int ar[70] = {0}, ar1[70];
  for (i = 0; i < 3; i++) {
    cin >> st;
    if (st[1] == '<') {
      b = st[2];
      ar[b]++;
    }
    if (st[1] == '>') {
      b = st[0];
      ar[b]++;
    }
  }
  if (ar[65] == 1 && ar[66] == 1 && ar[67] == 1) {
    cout << "Impossible";
    return 0;
    ;
  }
  for (j = 65; j < 68; j++) {
    if (ar[j] == 0) {
      b = j;
      ch = b;
      cout << ch;
    }
  }
  for (j = 65; j < 68; j++) {
    if (ar[j] == 1) {
      b = j;
      ch = b;
      cout << ch;
    }
  }
  for (j = 65; j < 68; j++) {
    if (ar[j] == 2) {
      b = j;
      ch = b;
      cout << ch;
    }
  }
  return 0;
  ;
}
