#include <bits/stdc++.h>
using namespace std;
int inp() {
  int n;
  cin >> n;
  return n;
}
int main() {
  vector<string> x(3);
  for (int c = 0; c < x.size(); c++) {
    cin >> x[c];
  };
  vector<int> y(3, 2);
  for (int c = 0; c < 3; c++) {
    if (x[c][1] == '>') {
      y[x[c][0] - 'A']++;
      y[x[c][2] - 'A']--;
    } else if (x[c][1] == '<') {
      y[x[c][0] - 'A']--;
      y[x[c][2] - 'A']++;
    }
  }
  if (y[0] > y[1] > y[2])
    cout << "CBA";
  else if (y[0] > y[2] > y[1])
    cout << "BCA";
  else if (y[1] > y[0] > y[2])
    cout << "CAB";
  else if (y[1] > y[2] > y[0])
    cout << "ACB";
  else if (y[2] > y[1] > y[0])
    cout << "ABC";
  else if (y[2] > y[0] > y[1])
    cout << "BAC";
  else
    cout << "Impossible";
}
