#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e5 + 1;
const long long MOD = 1e9 + 7;
const long long INF = 1e9;
void solve() {
  vector<string> v(3);
  string s;
  unordered_map<char, int> um;
  for (int i = 0; i < 3; i++) {
    cin >> s;
    if (s[1] == '<') {
      char c = s[0];
      s[0] = s[2];
      s[2] = c;
      s[1] = '>';
    }
    v[i] = s;
  }
  um['A'] = 0;
  um['B'] = 0;
  um['C'] = 0;
  int cnt1 = 0, cnt2 = 0, cnt3 = 0;
  char c1, c2, c3;
  for (int i = 0; i < 3; i++) {
    um[v[i][0]]++;
  }
  for (auto x : um) {
    if (x.second == 2) {
      c1 = x.first;
      cnt1 = 2;
    } else if (x.second == 1) {
      c2 = x.first;
    } else if (x.second == 0) {
      c3 = x.first;
    }
  }
  if (cnt1 != 2) {
    cout << "Impossible";
  } else {
    cout << c3 << c2 << c1;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int tc = 1;
  for (int t = 1; t <= tc; t++) {
    solve();
  }
}
