#include <bits/stdc++.h>
inline long long gcd(long long a, long long b) {
  return (b ? gcd(b, a % b) : a);
}
inline long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
inline int cmp(double x, double y = 0, double tol = 1e-7) {
  return (x <= y + tol) ? (x + tol < y) ? -1 : 0 : 1;
}
using namespace std;
const int MAXN = 30;
int main() {
  vector<string> v;
  string s;
  while (cin >> s) {
    if (s[0] > s[2]) {
      swap(s[0], s[2]);
      if (s[1] == '>')
        s[1] = '<';
      else
        s[1] = '>';
    }
    swap(s[1], s[2]);
    v.push_back(s);
  }
  sort(v.begin(), v.end());
  if (v[0][2] == '>') {
    if (v[1][2] == '>') {
      if (v[2][2] == '>')
        cout << "CBA\n";
      else
        cout << "BCA\n";
    } else {
      if (v[2][2] == '>')
        cout << "Impossible\n";
      else
        cout << "BAC\n";
    }
  } else {
    if (v[1][2] == '>') {
      if (v[2][2] == '>')
        cout << "CAB\n";
      else
        cout << "Impossible\n";
    } else {
      if (v[2][2] == '>')
        cout << "ACB\n";
      else
        cout << "ABC\n";
    }
  }
}
