#include <bits/stdc++.h>
using namespace std;
vector<int> adj[5];
int main() {
  cout.sync_with_stdio(false);
  cin.tie(nullptr);
  for (int i = 0; i < 3; i++) {
    string s;
    cin >> s;
    char a = s[0] - 'A', op = s[1], b = s[2] - 'A';
    if (op == '<') swap(a, b);
    adj[a].push_back(b);
  }
  vector<pair<int, int> > res;
  for (int i = 0; i < 3; i++) res.push_back({adj[i].size(), i});
  sort(res.begin(), res.end());
  if (res[0].first == 0 and res[1].first == 1 and res[2].first == 2) {
    char a = res[0].second + 'A';
    char b = res[1].second + 'A';
    char c = res[2].second + 'A';
    cout << a << b << c << endl;
  } else
    cout << "Impossible" << endl;
  return 0;
}
