#include <bits/stdc++.h>
using namespace std;
char s[10];
int deg[10];
int g[10][10];
void process(char *s) {
  int k1 = s[0] - 'A', k2 = s[2] - 'A';
  if (s[1] == '<')
    g[k2][k1]++, deg[k1] += 1;
  else
    g[k1][k2]++, deg[k2] += 1;
}
int mk[10];
int ans[10];
int main() {
  while (scanf("%s", s) != EOF) {
    memset(g, 0, sizeof(g));
    memset(deg, 0, sizeof(deg));
    process(s);
    scanf("%s", s);
    process(s);
    scanf("%s", s);
    process(s);
    int ok = 1, j;
    memset(mk, 0, sizeof(mk));
    for (int i = 0; ok && i < 3; i++) {
      for (j = 0; j < 3; j++)
        if (mk[j] == 0 && deg[j] == 0) break;
      if (j == 3)
        ok = 0;
      else {
        int k = j;
        mk[k] = 1;
        ans[i] = k;
        for (int j = 0; j < 3; j++) deg[j] -= g[k][j], g[k][j] = 0;
      }
    }
    if (ok == 0)
      puts("Impossible");
    else {
      for (int i = 2; i >= 0; i--) putchar(ans[i] + 'A');
      puts("");
    }
  }
  return 0;
}
