#include <bits/stdc++.h>
using namespace std;
string reverse_(string s) {
  string rev;
  for (int i = s.size() - 1; i >= 0; i--) {
    rev += s[i];
  }
  return rev;
}
int main() {
  string s[3], x, a, b, ans;
  for (int i = 0; i < 3; i++) {
    cin >> s[i];
    x = s[i];
    if (x[1] == '<') {
      x[1] = '>';
      s[i] = reverse_(x);
    }
  }
  for (int i = 0; i < 3; i++) {
    x = s[i];
    a += x[0];
    b += x[2];
  }
  if (a[0] != a[1] && a[0] != a[2] && a[2] != a[1]) {
    cout << "Impossible";
    return 0;
  }
  if (a[0] == a[1]) {
    ans += a[0];
    ans += a[2];
  } else if (a[0] == a[2]) {
    ans += a[0];
    ans += a[1];
  } else {
    ans += a[1];
    ans += a[0];
  }
  if (b[0] == b[1] || b[0] == b[2])
    ans += b[0];
  else
    ans += b[1];
  cout << reverse_(ans);
  return 0;
}
