#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
#pragma warning(disable : 4996)
using namespace std;
int main() {
  int p[3];
  p[0] = 1;
  p[1] = 2;
  p[2] = 3;
  int t11, t22, c11;
  int t12, t222, c22;
  for (int i = 0; i < 3; i++) {
    char k[4];
    scanf("%s", &k);
    int t1 = k[0] - 'A';
    int t2 = k[2] - 'A';
    bool c;
    if (k[1] == '>')
      c = 1;
    else
      c = 0;
    if (i == 0) {
      t11 = t1;
      t22 = t2;
      c11 = c;
      if (c) {
        if (!(p[t1] > p[t2])) {
          int t = p[t1];
          p[t1] = p[t2];
          p[t2] = t;
        }
      } else {
        if (!(p[t1] < p[t2])) {
          int t = p[t1];
          p[t1] = p[t2];
          p[t2] = t;
        }
      }
    }
    if (i == 1) {
      t12 = t1;
      t222 = t2;
      c22 = c;
      if (c) {
        if (!(p[t1] > p[t2])) {
          int t = p[t1];
          p[t1] = p[t2];
          p[t2] = t;
        }
      } else {
        if (!(p[t1] < p[t2])) {
          int t = p[t1];
          p[t1] = p[t2];
          p[t2] = t;
        }
      }
      if (c11) {
        if (!(p[t11] > p[t22])) {
          int t = p[t11];
          p[t11] = p[t22];
          p[t22] = t;
        }
      } else {
        if (!(p[t11] < p[t22])) {
          int t = p[t11];
          p[t11] = p[t22];
          p[t22] = t;
        }
      }
    }
    if (i == 2) {
      if (c) {
        if (!(p[t1] > p[t2])) {
          int t = p[t1];
          p[t1] = p[t2];
          p[t2] = t;
        }
      } else {
        if (!(p[t1] < p[t2])) {
          int t = p[t1];
          p[t1] = p[t2];
          p[t2] = t;
        }
      }
      if (c11) {
        if (!(p[t11] > p[t22])) {
          cout << "Impossible";
          return 0;
        }
      } else {
        if (!(p[t11] < p[t22])) {
          cout << "Impossible";
          return 0;
        }
      }
      if (c22) {
        if (!(p[t12] > p[t222])) {
          cout << "Impossible";
          return 0;
        }
      } else {
        if (!(p[t12] < p[t222])) {
          cout << "Impossible";
          return 0;
        }
      }
    }
  }
  for (int j = 1; j <= 3; j++) {
    for (int i = 0; i < 3; i++) {
      if (p[i] == j) {
        char k = 'A' + i;
        cout << k;
      }
    }
  }
  return 0;
}
