#include <bits/stdc++.h>
using namespace std;
int cnt[150] = {0};
int main() {
  char s[150];
  for (int i = 0; i < 3; i++) {
    cin >> s;
    if (s[1] == '<')
      cnt[s[2]]++;
    else
      cnt[s[0]]++;
  }
  if (cnt['A'] && cnt['B'] && cnt['C']) {
    cout << "Impossible" << endl;
    return 0;
  }
  for (int i = 0; i < 3; i++)
    for (int j = 0; j < 3; j++)
      if (cnt['A' + j] == i) cout << (char)('A' + j);
  cout << endl;
  return 0;
}
