#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2, s3;
  string great = "", small = "";
  string s[3];
  for (int i = 0; i < 3; i++) {
    cin >> s1;
    s[i] = s1;
  }
  int k = 3;
  string str = "";
  char w = 'A';
  while (k > 0) {
    int counter1 = 0;
    int counter2 = 0;
    for (int i = 0; i < 3; i++) {
      if (s[i][0] == w && s[i][1] == '>') {
        counter1++;
      }
      if (s[i][2] == w && s[i][1] == '<') {
        counter1++;
      }
      if (s[i][0] == w && s[i][1] == '<') {
        counter2++;
      }
      if (s[i][2] == w && s[i][1] == '>') {
        counter2++;
      }
    }
    if (counter1 == 2) {
      small = w;
      str += w;
    }
    if (counter2 == 2) {
      great = w;
      str += w;
    }
    w++;
    k--;
  }
  if (str.find('C') == -1 && str != "") {
    cout << great << "C" << small;
    return 0;
  }
  if (str.find('A') == -1 && str != "") {
    cout << great << "A" << small;
    return 0;
  }
  if (str.find('B') == -1 && str != "") {
    cout << great << "B" << small;
    return 0;
  }
  cout << "Impossible";
  return 0;
}
