#include <bits/stdc++.h>
using namespace std;
bool sortbysec(const pair<long long int, long long int>& a,
               const pair<long long int, long long int>& b) {
  return (a.second < b.second);
}
long long int max(long long int a, long long int b) {
  if (a > b) return a;
  return b;
}
long long int min(long long int a, long long int b) {
  if (a < b) return a;
  return b;
}
void cp() {
  string s1, s2, s3;
  cin >> s1 >> s2 >> s3;
  int a = 0, b = 0, c = 0;
  char arr[100000 + 1];
  if (s1[1] == '>') {
    if (s1[0] == 'A')
      a++;
    else if (s1[0] == 'B')
      b++;
    else
      c++;
  }
  if (s1[1] == '<') {
    if (s1[2] == 'A')
      a++;
    else if (s1[2] == 'B')
      b++;
    else
      c++;
  }
  if (s2[1] == '>') {
    if (s2[0] == 'A')
      a++;
    else if (s2[0] == 'B')
      b++;
    else
      c++;
  }
  if (s2[1] == '<') {
    if (s2[2] == 'A')
      a++;
    else if (s2[2] == 'B')
      b++;
    else
      c++;
  }
  if (s3[1] == '>') {
    if (s3[0] == 'A')
      a++;
    else if (s3[0] == 'B')
      b++;
    else
      c++;
  }
  if (s3[1] == '<') {
    if (s3[2] == 'A')
      a++;
    else if (s3[2] == 'B')
      b++;
    else
      c++;
  }
  arr[a] = 'A';
  arr[b] = 'B';
  arr[c] = 'C';
  if (a == b || b == c || c == a)
    cout << "Impossible"
         << "\n";
  else {
    for (long long int i = 0; i < 3; i++) cout << arr[i];
  }
  cout << "\n";
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cp();
  return 0;
}
