#include <bits/stdc++.h>
using namespace std;
int main() {
  string s[3];
  int a, b, c;
  a = 0;
  b = 0;
  c = 0;
  for (int i = 0; i < 3; i++) cin >> s[i];
  for (int i = 0; i < 3; i++) {
    if (s[i][1] == '>') {
      if (s[i][0] == 'A')
        a++;
      else if (s[i][0] == 'B')
        b++;
      else
        c++;
    } else if (s[i][1] == '<') {
      if (s[i][2] == 'A')
        a++;
      else if (s[i][2] == 'B')
        b++;
      else if (s[i][2] == 'C')
        c++;
    }
  }
  if (a == b || a == c || b == c)
    cout << "Impossible";
  else {
    if (a < b && a < c)
      cout << 'A';
    else if (b < a && b < c)
      cout << 'B';
    else
      cout << 'C';
    if ((a > b && a < c) || (a < b && a > c))
      cout << 'A';
    else if ((b > a && b < c) || (b < a && b > c))
      cout << 'B';
    else
      cout << 'C';
    if (a > b && a > c)
      cout << 'A';
    else if (b > a && b > c)
      cout << 'B';
    else
      cout << 'C';
  }
  return 0;
}
