#include <bits/stdc++.h>
using namespace std;
int main() {
  string t1, t2, t3, res = "";
  cin >> t1 >> t2 >> t3;
  int r[4];
  for (int i = 0; i < 4; i++) r[i] = 0;
  if (t1[1] == '>') {
    r[t1[0] - 'A']++;
  } else {
    r[t1[2] - 'A']++;
  }
  if (t2[1] == '>') {
    r[t2[0] - 'A']++;
  } else {
    r[t2[2] - 'A']++;
  }
  if (t3[1] == '>') {
    r[t3[0] - 'A']++;
  } else {
    r[t3[2] - 'A']++;
  }
  bool ban = 0;
  for (int i = 0; i < 3; i++) {
    ban = 0;
    for (int j = 0; j < 3; j++) {
      if (r[j] == i) {
        res.push_back('A' + j);
        if (ban) {
          cout << "Impossible" << endl;
          return 0;
        }
        ban = 1;
      }
    }
  }
  cout << res << endl;
}
