#include <bits/stdc++.h>
using namespace std;
int main() {
  int arr[3]{0};
  char n, m, x;
  char z;
  for (int i = 0; i < 3; ++i) {
    cin >> n >> m >> x;
    if (m == '>')
      arr[n - 'A']++;
    else
      arr[x - 'A']++;
  }
  if (arr[0] == 1 && arr[1] == 1 && arr[2] == 1) {
    cout << "Impossible";
    return 0;
  }
  if (arr[0] == 0) {
    z = 'A' + 0;
    cout << z;
  }
  if (arr[1] == 0) {
    z = 'A' + 1;
    cout << z;
  }
  if (arr[2] == 0) {
    z = 'A' + 2;
    cout << z;
  }
  if (arr[0] == 1) {
    z = 'A' + 0;
    cout << z;
  }
  if (arr[1] == 1) {
    z = 'A' + 1;
    cout << z;
  }
  if (arr[2] == 1) {
    z = 'A' + 2;
    cout << z;
  }
  if (arr[0] == 2) {
    z = 'A' + 0;
    cout << z;
  }
  if (arr[1] == 2) {
    z = 'A' + 1;
    cout << z;
  }
  if (arr[2] == 2) {
    z = 'A' + 2;
    cout << z;
  }
}
