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