#include <bits/stdc++.h>
long long fx[] = {1, -1, 0, 0};
long long fy[] = {0, 0, 1, -1};
using namespace std;
bool pairCompare2(const std::pair<long long, long long>& firstElem,
                  const std::pair<long long, long long>& secondElem) {
  return firstElem.second > secondElem.second;
}
int main() {
  map<char, int> boro, coto;
  map<char, int>::iterator it;
  vector<pair<int, char> > v, v1;
  char s[3][3];
  for (long long i = 0; i < 3; i++) {
    for (long long j = 0; j < 3; j++) {
      cin >> s[i][j];
    }
  }
  for (long long i = 0; i < 3; i++) {
    if (s[i][1] == '<') {
      boro[s[i][2]]++;
      coto[s[i][0]]++;
    }
    if (s[i][1] == '>') {
      boro[s[i][0]]++;
      coto[s[i][2]]++;
    }
  }
  for (it = boro.begin(); it != boro.end(); it++) {
    v.push_back(make_pair(it->second, it->first));
  }
  for (it = coto.begin(); it != coto.end(); it++) {
    v1.push_back(make_pair(it->second, it->first));
  }
  sort(v.begin(), v.end());
  reverse(v.begin(), v.end());
  sort(v1.begin(), v1.end());
  reverse(v1.begin(), v1.end());
  if (v1[0].first != 2) {
    cout << "Impossible";
  } else {
    cout << v1[0].second;
    cout << v[1].second;
    cout << v[0].second;
  }
}
