#include <bits/stdc++.h>
using namespace std;
char a[3];
int cs[3] = {0, 0, 0};
int x, y;
int main() {
  for (int i = 0; i < 3; i++) {
    cin >> a;
    x = a[0] - 'A';
    y = a[2] - 'A';
    if (a[1] == '>')
      cs[x]++;
    else
      cs[y]++;
  }
  if ((cs[0] != cs[1]) && (cs[1] != cs[2])) {
    a[cs[0]] = 'A';
    a[cs[1]] = 'B';
    a[cs[2]] = 'C';
    cout << a << endl;
  } else
    cout << "Impossible" << endl;
}
