#include <bits/stdc++.h>
int q[3] = {0};
int main() {
  char s1[10];
  char s2[10];
  char s3[10];
  for (int i = 0; i < 3; i++) {
    scanf("%s", s1);
    if (s1[1] == '<')
      q[s1[2] - 'A']++;
    else
      q[s1[0] - 'A']++;
  }
  if (q[1] == q[0])
    printf("Impossible");
  else {
    for (int i = 0; i < 3; i++)
      for (int j = 0; j < 3; j++)
        if (q[j] == i) printf("%c", 'A' + j);
  }
}
