#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b, c;
  cin >> a >> b >> c;
  pair<int, char> A[3];
  A[0].second = 'A';
  A[1].second = 'B';
  A[2].second = 'C';
  if (a[1] == '>') A[a[2] - 'A'].first++;
  if (a[1] == '<') A[a[0] - 'A'].first++;
  if (b[1] == '>') A[b[2] - 'A'].first++;
  if (b[1] == '<') A[b[0] - 'A'].first++;
  ;
  if (c[1] == '>') A[c[2] - 'A'].first++;
  if (c[1] == '<') A[c[0] - 'A'].first++;
  sort(A, A + 3);
  for (int i = 2; i >= 1; i--) {
    if (A[i].first == A[i - 1].first) {
      cout << "Impossible";
      return 0;
    }
  }
  for (int i = 2; i >= 0; i--) cout << A[i].second;
  return 0;
}
