#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  string s1, s2, s3;
  cin >> s1 >> s2 >> s3;
  long long a = 0, b = 0, c = 0;
  if ((s1[0] == 'A' && s1[1] == '>') || (s1[2] == 'A' && s1[1] == '<')) a++;
  if ((s3[0] == 'A' && s3[1] == '>') || (s3[2] == 'A' && s3[1] == '<')) a++;
  if ((s2[0] == 'A' && s2[1] == '>') || (s2[2] == 'A' && s2[1] == '<')) a++;
  if ((s1[0] == 'B' && s1[1] == '>') || (s1[2] == 'B' && s1[1] == '<')) b++;
  if ((s2[0] == 'B' && s2[1] == '>') || (s2[2] == 'B' && s2[1] == '<')) b++;
  if ((s3[0] == 'B' && s3[1] == '>') || (s3[2] == 'B' && s3[1] == '<')) b++;
  if ((s2[0] == 'C' && s2[1] == '>') || (s2[2] == 'C' && s2[1] == '<')) c++;
  if ((s3[0] == 'C' && s3[1] == '>') || (s3[2] == 'C' && s3[1] == '<')) c++;
  if ((s1[0] == 'C' && s1[1] == '>') || (s1[2] == 'C' && s1[1] == '<')) c++;
  if (a == b || b == c || a == c)
    cout << "Impossible\n";
  else {
    if (a == 0) cout << "A";
    if (b == 0) cout << "B";
    if (c == 0) cout << "C";
    if (a == 1) cout << "A";
    if (b == 1) cout << "B";
    if (c == 1) cout << "C";
    if (a == 2) cout << "A";
    if (b == 2) cout << "B";
    if (c == 2) cout << "C";
  }
}
