#include <bits/stdc++.h>
using namespace std;
int getpos(char c) { return c - 'A'; }
int main() {
  ios_base::sync_with_stdio(false);
  int arr[3]{};
  char s1[4];
  for (int i = 0; i < 3; i++) {
    cin >> s1;
    if (s1[1] == '<') {
      arr[getpos(s1[2])]++;
    } else {
      arr[getpos(s1[0])]++;
    }
  }
  bool valid = true;
  if (arr[0] + arr[1] + arr[2] != 3 || arr[0] == arr[1]) valid = false;
  for (int i = 0; i < 3; i++) {
    if (arr[i] > 2) {
      valid = false;
      break;
    }
    s1[arr[i]] = 'A' + i;
  }
  if (!valid)
    cout << "Impossible" << endl;
  else
    cout << s1 << endl;
  return 0;
}
