#include <bits/stdc++.h>
using namespace std;
template <class _T>
_T MAX(_T a, _T b) {
  return a > b ? a : b;
}
template <class _T>
_T MIN(_T a, _T b) {
  return a < b ? a : b;
}
int main(void) {
  int dep[3] = {0, 0, 0};
  int dl[3][3], dlc[3] = {0, 0, 0};
  int q[3], h = 0, t = 0;
  char ans[8];
  char a, b, c;
  for (int i = 0; i < 3; ++i) {
    scanf("%c%c%c\n", &a, &c, &b);
    if (c == '>') a ^= b ^= a ^= b;
    a -= 'A';
    b -= 'A';
    ++dep[b];
    dl[a][dlc[a]++] = b;
  }
  for (int i = 0; i < 3; ++i)
    if (!dep[i]) q[t++] = i;
  while (h != t) {
    int x = q[h];
    ans[h] = x + 'A';
    for (int i = 0; i < dlc[x]; ++i)
      if (!--dep[dl[x][i]]) q[t++] = dl[x][i];
    h++;
  }
  ans[3] = 0;
  if (h == 3)
    puts(ans);
  else
    puts("Impossible");
  return 0;
}
