#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<pair<int, int>> a(3);
  string s;
  int i, ch = 0, ch1;
  char ans[3];
  for (i = 0; i < 3; i++) {
    cin >> s;
    if (s[1] == '>') {
      a[(int)s[0] - 65].first++;
      a[(int)s[2] - 65].second++;
    } else {
      a[(int)s[2] - 65].first++;
      a[(int)s[0] - 65].second++;
    }
  }
  for (i = 0; i < 3; i++) {
    if (a[i].first == 2) {
      ch = 1;
      ans[2] = (char)(65 + i);
    } else if (a[i].first == 0) {
      ch = 1;
      ans[0] = (char)(65 + i);
    } else
      ch1 = i;
  }
  if (ch == 0)
    cout << "Impossible";
  else {
    ans[1] = (char)(65 + ch1);
    cout << ans[0] << ans[1] << ans[2];
  }
  return 0;
}
