#include <bits/stdc++.h>
using namespace std;
int main() {
  char first, sign, second;
  map<string, int> mapa;
  for (int i = 0; i < 3; i++) {
    scanf(" %c %c %c", &first, &sign, &second);
    if (first > second) {
      if (sign == '>')
        sign = '<';
      else
        sign = '>';
      swap(first, second);
    }
    string s;
    s.push_back(first);
    s.push_back(sign);
    s.push_back(second);
    mapa[s]++;
  }
  if (mapa["A<B"]) {
    if (mapa["B>C"]) {
      if (mapa["A<C"]) printf("ACB\n");
      if (mapa["A>C"]) printf("CAB\n");
    } else {
      if (mapa["A<C"]) printf("ABC\n");
      if (mapa["A>C"]) printf("Impossible\n");
    }
  } else {
    if (mapa["A>C"]) {
      if (mapa["B<C"]) printf("BCA\n");
      if (mapa["B>C"]) printf("CBA\n");
    } else {
      if (mapa["B<C"]) printf("BAC\n");
      if (mapa["B>C"]) printf("Impossible\n");
    }
  }
  return 0;
}
