#include <bits/stdc++.h>
using namespace std;
const int N = 3;
string a[N];
int d[N];
void finish() {
  cout << "Impossible" << endl;
  exit(0);
}
int main() {
  ios_base::sync_with_stdio(false);
  for (int i = 0; i < N; i++) cin >> a[i];
  for (int i = 0; i < N; i++)
    if (a[i][1] == '>')
      d[a[i][0] - 'A']++;
    else
      d[a[i][2] - 'A']++;
  for (int i = 0; i < N; i++)
    for (int j = 0; j < i; j++)
      if (d[i] == d[j]) finish();
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < N; j++)
      if (d[j] == i) cout << char('A' + j);
  }
  cout << endl;
  return 0;
}
