#include <bits/stdc++.h>
using namespace std;
int a, b, c;
string s1, s2, s3;
char tmp;
int main() {
  cin >> s1 >> s2 >> s3;
  if (s1[1] == '<') s1[1] = '>', tmp = s1[0], s1[0] = s1[2], s1[2] = tmp;
  if (s2[1] == '<') s2[1] = '>', tmp = s2[0], s2[0] = s2[2], s2[2] = tmp;
  if (s3[1] == '<') s3[1] = '>', tmp = s3[0], s3[0] = s3[2], s3[2] = tmp;
  if (s1[0] == 'A') a++;
  if (s2[0] == 'A') a++;
  if (s3[0] == 'A') a++;
  if (s1[0] == 'B') b++;
  if (s2[0] == 'B') b++;
  if (s3[0] == 'B') b++;
  if (s1[0] == 'C') c++;
  if (s2[0] == 'C') c++;
  if (s3[0] == 'C') c++;
  if (s1[2] == 'A') a--;
  if (s2[2] == 'A') a--;
  if (s3[2] == 'A') a--;
  if (s1[2] == 'B') b--;
  if (s2[2] == 'B') b--;
  if (s3[2] == 'B') b--;
  if (s1[2] == 'C') c--;
  if (s2[2] == 'C') c--;
  if (s3[2] == 'C') c--;
  if (a < 1 && b < 1 && c < 1)
    cout << "Impossible" << endl;
  else {
    if (min(min(a, b), c) == a) cout << "A";
    if (min(min(a, b), c) == b) cout << "B";
    if (min(min(a, b), c) == c) cout << "C";
    if (min(min(a, b), c) != a && max(max(a, b), c) != a) cout << "A";
    if (min(min(a, b), c) != b && max(max(a, b), c) != b) cout << "B";
    if (min(min(a, b), c) != c && max(max(a, b), c) != c) cout << "C";
    if (max(max(a, b), c) == a) cout << "A";
    if (max(max(a, b), c) == b) cout << "B";
    if (max(max(a, b), c) == c) cout << "C";
    cout << endl;
  }
  return 0;
}
