#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
template <typename T>
inline T sqr(T n) {
  return n * n;
}
void solve(int CASE) {
  int a = 0, b = 0, c = 0, n = 3;
  while (n--) {
    string s;
    cin >> s;
    char ch = (s[1] == '>') ? s[0] : s[2];
    if (ch == 'A')
      a++;
    else if (ch == 'B')
      b++;
    else
      c++;
  }
  vector<bool> check(3, true);
  char res[4];
  check[a] = false, res[a] = 'A';
  check[b] = false, res[b] = 'B';
  check[c] = false, res[c] = 'C';
  for (int i = 0; i < 3; i++)
    if (check[i]) {
      cout << "Impossible"
           << "\n";
      return;
    }
  res[3] = '\0';
  cout << res << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.precision(14);
  cout << fixed;
  int t = 1;
  for (int i = 0; i != t; i++) solve(i + 1);
  return 0;
}
