#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  vector<string> s(3);
  for (int i = 0; i < 3; ++i) {
    cin >> s[i];
    if (s[i][1] == '>') {
      swap(s[i][0], s[i][2]);
      s[i][1] = '<';
    }
  }
  sort(s.begin(), s.end());
  if (s[0] == "A<B" && s[1] == "A<C" && s[2] == "B<C")
    cout << "ABC";
  else if (s[0] == "A<B" && s[1] == "A<C" && s[2] == "C<B")
    cout << "ACB";
  else if (s[0] == "A<C" && s[1] == "B<A" && s[2] == "B<C")
    cout << "BAC";
  else if (s[0] == "B<A" && s[1] == "B<C" && s[2] == "C<A")
    cout << "BCA";
  else if (s[0] == "A<B" && s[1] == "C<A" && s[2] == "C<B")
    cout << "CAB";
  else if (s[0] == "B<A" && s[1] == "C<A" && s[2] == "C<B")
    cout << "CBA";
  else
    cout << "Impossible";
  return 0;
}
