#include <bits/stdc++.h>
using namespace std;
struct Str {
  char sin1 = 'p', sin2 = 'p';
} let[3];
int f(Str a) {
  if (a.sin1 == a.sin2 && a.sin1 == '>') return 1;
  if (a.sin1 != a.sin2) return 0;
  return -1;
}
int main() {
  string s, os = "ppp";
  for (int i = 0; i < 3; i++) {
    cin >> s;
    if (let[s[0] - 65].sin1 == 'p')
      let[s[0] - 65].sin1 = (s[1] == '>' ? '>' : '<');
    else
      let[s[0] - 65].sin2 = (s[1] == '>' ? '>' : '<');
    if (let[s[2] - 65].sin1 == 'p')
      let[s[2] - 65].sin1 = (s[1] == '>' ? '<' : '>');
    else
      let[s[2] - 65].sin2 = (s[1] == '>' ? '<' : '>');
  }
  for (int i = 0; i < 3; i++) {
    if (f(let[i]) == 1)
      os[2] = i + 65;
    else if (f(let[i]) == 0)
      os[1] = i + 65;
    else
      os[0] = i + 65;
  }
  if (f(let[0]) == f(let[1]) || f(let[0]) == f(let[2]) ||
      f(let[2]) == f(let[1]))
    cout << "Impossible" << endl;
  else
    cout << os << endl;
  return 0;
}
