#include <bits/stdc++.h>
using namespace std;
int main() {
  char a1, a2, a3, b1, b2, b3, s1, s2, s3;
  int ans[7][3] = {0, 1, 2, 0, 2, 1, 1, 0, 2, 1, 2, 0, 2, 0, 1, 2, 1, 0};
  scanf("%c%c%c\n", &a1, &s1, &b1);
  scanf("%c%c%c\n", &a2, &s2, &b2);
  scanf("%c%c%c", &a3, &s3, &b3);
  if (s1 == '=' || s2 == '=' || s3 == '=') {
    printf("Impossible");
    return 0;
  }
  int i;
  for (i = 0; i < 7; i++) {
    if (s1 == '<' && ans[i][a1 - 'A'] > ans[i][b1 - 'A']) continue;
    if (s1 == '>' && ans[i][a1 - 'A'] < ans[i][b1 - 'A']) continue;
    if (s2 == '<' && ans[i][a2 - 'A'] > ans[i][b2 - 'A']) continue;
    if (s2 == '>' && ans[i][a2 - 'A'] < ans[i][b2 - 'A']) continue;
    if (s3 == '<' && ans[i][a3 - 'A'] > ans[i][b3 - 'A']) continue;
    if (s3 == '>' && ans[i][a3 - 'A'] < ans[i][b3 - 'A']) continue;
    break;
  }
  if (i == 0)
    printf("ABC");
  else if (i == 1)
    printf("ACB");
  else if (i == 2)
    printf("BAC");
  else if (i == 3)
    printf("CAB");
  else if (i == 4)
    printf("BCA");
  else if (i == 5)
    printf("CBA");
  else
    printf("Impossible");
  return 0;
}
