#include <bits/stdc++.h>
using namespace std;
double pi =
    3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679;
void fast() {
  std::ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
}
long long sumd(long long x) {
  long long z = 0;
  while (x) {
    z += x % 10;
    x /= 10;
  }
  return z;
}
pair<int, int> a[3];
int main() {
  fast();
  long long t = 3, c = 0;
  string s;
  for (int i = 0; i < 3; i++) {
    cin >> s;
    if (s[0] == 'A') {
      if (s[1] == '>') a[0].first++;
      if (s[1] == '<') a[0].second++;
    }
    if (s[0] == 'B') {
      if (s[1] == '>') a[1].first++;
      if (s[1] == '<') a[1].second++;
    }
    if (s[0] == 'C') {
      if (s[1] == '>') a[2].first++;
      if (s[1] == '<') a[2].second++;
    }
    if (s[2] == 'A') {
      if (s[1] == '<') a[0].first++;
      if (s[1] == '>') a[0].second++;
    }
    if (s[2] == 'B') {
      if (s[1] == '<') a[1].first++;
      if (s[1] == '>') a[1].second++;
    }
    if (s[2] == 'C') {
      if (s[1] == '<') a[2].first++;
      if (s[1] == '>') a[2].second++;
    }
  }
  char a1 = '0', a2 = '0', a3 = '0';
  for (int i = 0; i < 3; i++) {
    if (a[i].first == 2 && a[i].second == 0) a3 = char('A' + i);
    if (a[i].second == 2 && a[i].first == 0) a1 = char('A' + i);
    if (a[i].first == 1 && a[i].second == 1) a2 = char('A' + i);
  }
  if (a1 == '0' || a3 == '0' || a2 == '0')
    cout << "Impossible";
  else
    cout << a1 << a2 << a3;
}
