#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2, s3;
  cin >> s1 >> s2 >> s3;
  char a[2];
  char b[2];
  char c[2];
  if (s1[1] == '<') {
    a[0] = s1[0];
    a[1] = s1[2];
  } else {
    a[0] = s1[2];
    a[1] = s1[0];
  }
  if (s2[1] == '<') {
    b[0] = s2[0];
    b[1] = s2[2];
  } else {
    b[0] = s2[2];
    b[1] = s2[0];
  }
  if (s3[1] == '<') {
    c[0] = s3[0];
    c[1] = s3[2];
  } else {
    c[0] = s3[2];
    c[1] = s3[0];
  }
  if (a[1] != b[1] && b[1] != c[1] && a[1] != c[1])
    cout << "Impossible\n";
  else {
    char cmp[3];
    if (a[1] == b[1]) {
      cmp[2] = a[1];
      cmp[0] = c[0];
      cmp[1] = c[1];
    } else if (a[1] == c[1]) {
      cmp[2] = c[1];
      cmp[0] = b[0];
      cmp[1] = b[1];
    } else {
      cmp[2] = b[1];
      cmp[0] = a[0];
      cmp[1] = a[1];
    }
    for (int i = 0; i < 3; i++) cout << cmp[i];
    cout << '\n';
  }
}
