#include <bits/stdc++.h>
using namespace std;
pair<int, char> a;
pair<int, char> b;
pair<int, char> c;
void YoussefMo7amed();
void fun(char x, char y, char s);
bool sortinrev(const pair<int, char> &a, const pair<int, char> &b);
int main() {
  a.second = 'A';
  a.first = 0;
  b.second = 'B';
  b.first = 0;
  c.second = 'C';
  c.first = 0;
  void YoussefMo7amed();
  char x, y;
  char s;
  for (int i = 0; i < 3; i++) {
    cin >> x >> s >> y;
    fun(x, y, s);
  }
  vector<pair<int, char> > v;
  v.push_back(a);
  v.push_back(c);
  v.push_back(b);
  sort(v.begin(), v.end(), sortinrev);
  if (a.first != b.first && b.first != c.first && a.first != c.first) {
    while (!v.empty()) {
      cout << v.back().second;
      v.pop_back();
    }
  } else {
    cout << "Impossible";
  }
  return 0;
}
void YoussefMo7amed() {
  ios::sync_with_stdio(0);
  cin.tie(0);
}
void fun(char x, char y, char s) {
  if (s == '>') {
    if (x == 'A') {
      a.first++;
    } else if (x == 'B') {
      b.first++;
    } else if (x == 'C') {
      c.first++;
    }
  } else if (s == '<') {
    if (y == 'A') {
      a.first++;
    } else if (y == 'B') {
      b.first++;
    } else if (y == 'C') {
      c.first++;
    }
  }
}
bool sortinrev(const pair<int, char> &a, const pair<int, char> &b) {
  return (a.first > b.first);
}
