#include <bits/stdc++.h>
using namespace std;
void mego() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
struct element {
  int day;
  int month;
  int year;
  int cons;
};
int deg(string s) {
  if (s == "9") return 1;
  int n = 0;
  for (int i = 0; i < s.size(); i++) n += (s[i] - '0');
  if (n != 0 && n % 9 == 0) {
    return 1 + deg(to_string(n));
  } else
    return 0;
}
int main() {
  mego();
  int q = 0, a = 0, c = 0, t = 0, b = 0, n, m, d = 0;
  string s;
  for (int i = 0; i < 3; i++) {
    cin >> s;
    if (s[1] == '>') {
      if (s[0] == 'A')
        a++;
      else if (s[0] == 'B')
        b++;
      else
        c++;
    } else {
      if (s[2] == 'A')
        a++;
      else if (s[2] == 'B')
        b++;
      else
        c++;
    }
  }
  s = "***";
  s[a] = 'A';
  s[b] = 'B';
  s[c] = 'C';
  if (s[0] == '*' || s[1] == '*' || s[2] == '*')
    cout << "Impossible";
  else
    cout << s;
  return 0;
}
