#include <bits/stdc++.h>
using namespace std;
int main() {
  string first, second, third;
  char ans[3];
  int result[3] = {0, 0, 0};
  cin >> first >> second >> third;
  if (first[1] == '>') {
    result[first[0] - 'A']++;
  } else {
    result[first[2] - 'A']++;
  }
  if (second[1] == '>') {
    result[(int)second[0] - 'A']++;
  } else {
    result[(int)second[2] - 'A']++;
  }
  if (third[1] == '>') {
    result[(int)third[0] - 'A']++;
  } else {
    result[(int)third[2] - 'A']++;
  }
  if (result[0] == result[1] || result[0] == result[2] ||
      result[1] == result[2])
    cout << "Impossible";
  else {
    ans[result[0]] = 'A';
    ans[result[1]] = 'B';
    ans[result[2]] = 'C';
    cout << ans[0] << ans[1] << ans[2];
  }
  return 0;
}
