#include <bits/stdc++.h>
using namespace std;
const int inf = 100000000;
const double eps = 0.000001;
int main() {
  vector<string> s(3);
  vector<pair<char, int> > res(3);
  int a = 0, b = 0, c = 0;
  cin >> s[0] >> s[1] >> s[2];
  for (int i = 0; i < 3; i++) {
    if (s[i][1] == '>') {
      if (s[i][0] == 'A') a++;
      if (s[i][0] == 'B') b++;
      if (s[i][0] == 'C') c++;
    }
    if (s[i][1] == '<') {
      if (s[i][2] == 'A') a++;
      if (s[i][2] == 'B') b++;
      if (s[i][2] == 'C') c++;
    }
  }
  if (a == b && b == c)
    cout << "Impossible";
  else if (a < b && a < c) {
    cout << 'A';
    if (b < c)
      cout << "BC";
    else
      cout << "CB";
  } else if (b < c && b < a) {
    cout << 'B';
    if (a < c)
      cout << "AC";
    else
      cout << "CA";
  } else {
    cout << 'C';
    if (a < b)
      cout << "AB";
    else
      cout << "BA";
  }
  cout << endl;
  cin >> a;
  return 0;
}
