#include <bits/stdc++.h>
using namespace std;
int x[3] = {0, 0, 0};
void fun(char a, char b, char s) {
  switch (s) {
    case '>':
      if (a == 'A') {
        x[0]++;
      } else if (a == 'B') {
        x[1]++;
      } else {
        x[2]++;
      }
      break;
    case '<':
      if (b == 'A') {
        x[0]++;
      } else if (b == 'B') {
        x[1]++;
      } else {
        x[2]++;
      }
      break;
  }
}
int main() {
  char a, b, s;
  scanf(" %c%c%c", &a, &s, &b);
  fun(a, b, s);
  scanf(" %c%c%c", &a, &s, &b);
  fun(a, b, s);
  scanf(" %c%c%c", &a, &s, &b);
  fun(a, b, s);
  char z[4];
  z[3] = '\0';
  bool st[3] = {false, false, false};
  for (int i = 0; i < 3; i++) {
    if (st[x[i]] == true) {
      cout << "Impossible";
      return 0;
    } else {
      st[x[i]] = true;
    }
  }
  for (int i = 0; i < 3; i++) {
    z[x[i]] = char(i + 65);
  }
  cout << z << endl;
}
