#include <bits/stdc++.h>
using namespace std;
map<char, int> mp;
int main(void) {
  string s[3];
  cin >> s[0] >> s[1] >> s[2];
  for (int i = 0; i < 3; ++i) {
    mp[s[i][0]]++;
    mp[s[i][2]]++;
  }
  if (mp['A'] == 2 && mp['B'] == 2 && mp['C'] == 2) {
    mp['A'] = 0;
    mp['B'] = 0;
    mp['C'] = 0;
    for (int i = 0; i < 3; ++i) {
      if (s[i][1] == '>') {
        mp[s[i][0]]++;
      } else {
        mp[s[i][2]]++;
      }
    }
    char ch1, ch2, ch3;
    bool b1, b2, b3;
    b1 = b2 = b3 = false;
    for (auto i : mp) {
      if (i.second == 0) {
        ch1 = i.first;
        b1 = true;
      } else if (i.second == 1) {
        ch2 = i.first;
        b2 = true;
      } else {
        ch3 = i.first;
        b3 = true;
      }
    }
    if (b1 && b2 && b3)
      cout << ch1 << ch2 << ch3;
    else
      cout << "Impossible";
  } else {
    cout << "Impossible";
  }
  return 0;
}
