#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[3][3];
  int b[3] = {0};
  for (int i = 0; i < 3; i++) {
    a[i][0] = getchar();
    a[i][1] = getchar();
    a[i][2] = getchar();
    if (a[i][1] == '>') {
      b[a[i][0] - 'A']++;
      b[a[i][2] - 'A']--;
    } else {
      b[a[i][0] - 'A']--;
      b[a[i][2] - 'A']++;
    }
    getchar();
  }
  string str;
  bool cool = false;
  for (int i = 0; i < 3; i++) {
    if (b[i] == -2) {
      str.push_back(('A' + i));
      cool = true;
    }
  }
  if (!cool) {
    printf("Impossible\n");
    return 0;
  }
  cool = false;
  for (int i = 0; i < 3; i++) {
    if (b[i] == 0) {
      str.push_back(('A' + i));
      cool = true;
    }
  }
  if (!cool) {
    printf("Impossible\n");
    return 0;
  }
  cool = false;
  for (int i = 0; i < 3; i++) {
    if (b[i] == 2) {
      str.push_back(('A' + i));
      cool = true;
    }
  }
  if (!cool) {
    printf("Impossible\n");
    return 0;
  }
  cout << str << endl;
  return 0;
}
