#include <bits/stdc++.h>
using namespace std;
char ch(int x) {
  if (x == 0)
    return 'A';
  else if (x == 1)
    return 'B';
  return 'C';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  vector<long long> v(3, 0);
  for (int i = 0; i < 3; ++i) {
    string k;
    cin >> k;
    if (k[1] == '>') {
      long long a = k[0] - 'A';
      v[a]++;
      long long b = k[2] - 'A';
      v[b]--;
    } else {
      long long a = k[0] - 'A';
      v[a]--;
      long long b = k[2] - 'A';
      v[b]++;
    }
  }
  long long c, d, md;
  c = 0;
  d = 0;
  md = 0;
  for (int i = 0; i < 3; ++i) {
    if (v[i] == 0) ++c;
    if (v[i] == 2) ++d;
    if (v[i] == -2) ++md;
  }
  if (c == d && d == md && md == 1) {
    char f, s, t;
    for (int i = 0; i < 3; ++i) {
      if (v[i] == 0) s = ch(i);
      if (v[i] == 2) t = ch(i);
      if (v[i] == -2) f = ch(i);
    }
    printf("%c", f);
    printf("%c", s);
    printf("%c", t);
  } else
    cout << "Impossible" << '\n';
  return 0;
}
