#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<string> x;
  vector<pair<int, char>> s = {{0, 'A'}, {0, 'B'}, {0, 'C'}};
  for (int i = 0; i < 3; i++) {
    string temp;
    cin >> temp;
    if (temp == "A>B" || temp == "B<A") {
      s[0].first++;
    }
    if (temp == "A>C" || temp == "C<A") {
      s[0].first++;
    }
    if (temp == "B>A" || temp == "A<B") {
      s[1].first++;
    }
    if (temp == "B>C" || temp == "C<B") {
      s[1].first++;
    }
    if (temp == "C>A" || temp == "A<C") {
      s[2].first++;
    }
    if (temp == "C>B" || temp == "B<C") {
      s[2].first++;
    }
  }
  sort(s.begin(), s.end());
  if (s[0].first == s[1].first || s[1].first == s[2].first ||
      s[2].first == s[0].first) {
    cout << "Impossible";
  } else {
    for (int i = 0; i < 3; i++) {
      cout << s[i].second;
    }
  }
  return 0;
}
