#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<string> s;
  string in;
  string Case("Impossible");
  int arr[3] = {0};
  char out[3];
  char Alpha[] = "ABC";
  for (int i = 0; i < 3; i++) {
    cin >> in;
    s.push_back(in);
  }
  char c;
  for (int i = 0; i < 3; i++) {
    if (s[i][1] == '>') {
      c = s[i][2];
      s[i][2] = s[i][0];
      s[i][0] = c;
    }
  }
  for (int i = 0; i < 3; i++) {
    if (s[i][2] == 'A') arr[0]++;
    if (s[i][2] == 'B') arr[1]++;
    if (s[i][2] == 'C') arr[2]++;
  }
  for (int i = 0; i < 3; i++) {
    if (arr[i] == 2) Case = "Possible";
    if (arr[i] == 0) out[0] = Alpha[i];
    if (arr[i] == 1) out[1] = Alpha[i];
    if (arr[i] == 2) out[2] = Alpha[i];
  }
  if (Case == "Possible") {
    for (int i = 0; i < 3; i++) cout << out[i];
  } else
    cout << "Impossible";
  return 0;
}
