#include <bits/stdc++.h>
int x, y, z;
bool map[10][10];
char s1[10], s2[10], s3[10];
int main() {
  scanf("%s%s%s", s1 + 1, s2 + 1, s3 + 1);
  if (s1[2] == '<')
    map[s1[1] - 'A' + 1][s1[3] - 'A' + 1] = true;
  else
    map[s1[3] - 'A' + 1][s1[1] - 'A' + 1] = true;
  if (s2[2] == '<')
    map[s2[1] - 'A' + 1][s2[3] - 'A' + 1] = true;
  else
    map[s2[3] - 'A' + 1][s2[1] - 'A' + 1] = true;
  if (s3[2] == '<')
    map[s3[1] - 'A' + 1][s3[3] - 'A' + 1] = true;
  else
    map[s3[3] - 'A' + 1][s3[1] - 'A' + 1] = true;
  if (map[1][2] && map[2][3]) {
    if (map[3][1])
      printf("Impossible\n");
    else
      printf("ABC\n");
  } else if (map[1][2] && map[3][2]) {
    if (map[3][1])
      printf("CAB\n");
    else if (map[1][3])
      printf("ACB\n");
  } else {
    if (map[1][3]) {
      if (map[3][2])
        printf("Impossible\n");
      else
        printf("BAC\n");
    } else if (map[3][1]) {
      if (map[2][3])
        printf("BCA\n");
      else
        printf("CBA\n");
    }
  }
  return 0;
}
