#include <bits/stdc++.h>
using namespace std;
int main() {
  bool map[5][5];
  memset(map, 0, sizeof(map));
  int i, j, k, ii, jj;
  char s[10];
  for (i = 1; i <= 3; i++)
    for (j = 1; j <= 3; j++) map[i][j] = (i == j) ? 0 : 1;
  for (i = 1; i <= 3; ++i) {
    scanf("%s", s);
    if (s[1] == '<')
      map[s[0] - 'A' + 1][s[2] - 'A' + 1] = 0;
    else
      map[s[2] - 'A' + 1][s[0] - 'A' + 1] = 0;
  }
  int flag = 0;
  for (i = 1; i <= 3; i++)
    for (j = 1; j <= 3; j++) {
      if (j == i) continue;
      k = 6 - i - j;
      if (k == i) continue;
      if (k == j) continue;
      int ok = 1;
      for (ii = 1; ii <= 3; ii++)
        for (jj = 1; jj <= 3; jj++) {
          if (ii == i && jj == j) {
            if (!map[i][j]) ok = 0;
            continue;
          }
          if (ii == j && jj == k) {
            if (!map[j][k]) ok = 0;
            continue;
          }
          if (ii == i && jj == k) {
            if (!map[i][k]) ok = 0;
            continue;
          }
        }
      if (ok)
        flag = 1, printf("%c%c%c\n", k - 1 + 'A', j - 1 + 'A', i - 1 + 'A');
    }
  if (!flag) printf("Impossible\n");
  return 0;
}
