#include <bits/stdc++.h>
using namespace std;
int arr[1007];
int main() {
  char c;
  int t = 3;
  while (t--) {
    scanf(" %c", &c);
    char temp;
    scanf("%c", &temp);
    char d;
    scanf("%c", &d);
    if (temp == '>') {
      arr[c]++;
      arr[d]--;
    } else {
      arr[c]--;
      arr[d]++;
    }
  }
  int flag1 = 0;
  char x, y, z;
  int flag2 = 0;
  int flag3 = 0;
  for (int i = 'A'; i <= 'C'; i++) {
    if (arr[i] == 2) {
      flag1 = 1;
      x = (char)i;
    }
    if (arr[i] == 0) {
      flag2 = 1;
      y = (char)i;
    }
    if (arr[i] == -2) {
      flag3 = 1;
      z = (char)i;
    }
  }
  if (flag1 && flag2 && flag3) {
    cout << z << y << x << endl;
  } else
    puts("Impossible");
  return 0;
}
