#include <bits/stdc++.h>
using namespace std;
map<char, int> cnt;
bool f(char a, char b) { return cnt[a] < cnt[b]; }
int main() {
  map<pair<char, char>, int> M;
  for (int i = 0; i < 3; i++) {
    char a, x, b;
    cin >> a >> x >> b;
    if (x == '<') {
      M[{a, b}] = 0;
      M[{b, a}] = 1;
      cnt[b]++;
    } else {
      M[{a, b}] = 1;
      M[{b, a}] = 0;
      cnt[a]++;
    }
  }
  string s = "ABC";
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < 3; j++) {
      for (int k = 0; k < 3; k++) {
        if (M[{s[i], s[j]}] && M[{s[j], s[k]}]) {
          M[{s[i], s[k]}] = 1;
          M[{s[k], s[i]}] = 0;
          cnt[s[i]]++;
        }
      }
    }
  }
  if (cnt['A'] * cnt['B'] * cnt['C']) {
    puts("Impossible");
    return 0;
  }
  sort(s.begin(), s.end(), f);
  cout << s;
  return 0;
}
