#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fLL;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  map<char, int> I, O;
  char a, b, x;
  cin >> a >> x >> b;
  if (x == '>') swap(a, b);
  I[a]++;
  O[b]++;
  cin >> a >> x >> b;
  if (x == '>') swap(a, b);
  I[a]++;
  O[b]++;
  cin >> a >> x >> b;
  if (x == '>') swap(a, b);
  I[a]++;
  O[b]++;
  string ans = "";
  for (auto e : {'A', 'B', 'C'}) {
    if (I[e] == 0) {
      ans += e;
      break;
    }
  }
  for (auto e : {'A', 'B', 'C'}) {
    if (O[e] == 1 && I[e] == 1) {
      ans += e;
      break;
    }
  }
  for (auto e : {'A', 'B', 'C'}) {
    if (O[e] == 0) {
      ans += e;
      break;
    }
  }
  reverse(ans.begin(), ans.end());
  if (ans.size() == 3)
    cout << ans << '\n';
  else
    cout << "Impossible" << '\n';
  return 0;
}
