#include <bits/stdc++.h>
using namespace std;
int main() {
  string a[] = {"ABC", "ACB", "BCA", "BAC", "CAB", "CBA"}, str[3];
  ;
  string str1, str2, str3;
  cin >> str[0] >> str[1] >> str[2];
  for (int i = 0; i < 6; i++) {
    int t[3];
    t[a[i][0] - 'A'] = 0;
    t[a[i][1] - 'A'] = 1;
    t[a[i][2] - 'A'] = 2;
    bool is = 1;
    for (int j = 0; j < 3; j++) {
      if (str[j][1] == '>' && t[str[j][0] - 'A'] < t[str[j][2] - 'A']) {
        is = 0;
      } else if (str[j][1] == '<' && t[str[j][0] - 'A'] > t[str[j][2] - 'A']) {
        is = 0;
      }
    }
    if (is) {
      cout << a[i] << endl;
      return 0;
    }
  }
  cout << "Impossible\n";
  return 0;
}
