#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int mx = 1e6;
void solve() {
  vector<string> v(3);
  for (auto& x : v) cin >> x;
  int arr[3];
  memset(arr, 0, sizeof(arr));
  for (auto& x : v) {
    if (x[1] == '>') {
      arr[x[0] - 'A']++;
      arr[x[2] - 'A']--;
    } else if (x[1] == '<') {
      arr[x[0] - 'A']--;
      arr[x[2] - 'A']++;
    }
  }
  map<int, int> mp;
  for (int i(0); i < 3; ++i) {
    mp[arr[i]] = i;
  }
  bool ans = true;
  sort(arr, arr + 3);
  if (arr[0] == -2 and arr[1] == 0 and arr[2] == 2) {
    for (auto& x : mp) cout << char(x.second + 'A');
  } else
    cout << "Impossible" << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  solve();
  return 0;
}
