#include <bits/stdc++.h>
using namespace std;
int a[100010], b[100010];
long long mn = 1e9, mx = -1e9, ans, cnt, sm;
bool ok, okk, used[1000010], use[10010];
int main() {
  vector<pair<int, char> > v;
  v.push_back(make_pair(0, 'A'));
  v.push_back(make_pair(0, 'B'));
  v.push_back(make_pair(0, 'C'));
  for (int i = 0; i < 3; i++) {
    string s;
    cin >> s;
    if (s[1] == '>') {
      for (int j = 0; j < v.size(); j++) {
        if (v[j].second == s[0]) {
          v[j].first++;
          break;
        }
      }
    } else {
      for (int j = 0; j < v.size(); j++) {
        if (v[j].second == s[2]) {
          v[j].first++;
          break;
        }
      }
    }
  }
  sort(v.begin(), v.end());
  if (v[0].first == 0 && v[1].first == 1 && v[2].first == 2) {
    for (int i = 0; i < v.size(); i++) {
      cout << v[i].second;
    }
    return 0;
  }
  cout << "Impossible";
  return 0;
}
