#include <bits/stdc++.h>
using namespace std;
class letter {
 public:
  char lettera;
  int freq;
  letter() {}
  letter(char l, int f) {
    lettera = l;
    freq = f;
  }
};
int main() {
  char buffer;
  int trace[int('C') + 1] = {0};
  letter res[3];
  for (int i = 0; i < 3; i++) {
    char first, sign, second;
    cin >> first >> sign >> second;
    if (sign == '>') trace[first]++;
    if (sign == '<') trace[second]++;
  }
  for (int i = 65; i < 68; i++) {
    letter tmp(char(i), trace[i]);
    res[i - 65] = tmp;
  }
  for (int i = 0; i < 2; i++) {
    for (int j = i + 1; j < 3; j++) {
      if (res[i].freq == res[j].freq) {
        cout << "Impossible";
        return 0;
      } else if (res[i].freq > res[j].freq) {
        letter tmp = res[i];
        res[i] = res[j];
        res[j] = tmp;
      }
    }
  }
  for (int i = 0; i < 3; i++) {
    cout << res[i].lettera;
  }
}
