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