#include <bits/stdc++.h>
using namespace std;
string s[4];
unordered_map<char, int> idx;
unordered_map<char, int> ch;
bool check(string h) {
  bool key = false;
  for (int i = 0; i < h.size(); i++) {
    ch[h[i]] = i;
  }
  for (int i = 0; i < 3; i++) {
    int j = 0;
    if (ch[s[i][j]] - ch[s[i][j + 2]] < 0 && s[i][j + 1] == '<') {
      key = true;
    } else if (ch[s[i][j]] - ch[s[i][j + 2]] > 0 && s[i][j + 1] == '>') {
      key = true;
    } else {
      key = false;
      break;
    }
  }
  return key;
}
int main() {
  string result;
  bool res = false;
  for (int i = 0; i < 3; i++) {
    cin >> s[i];
  }
  string a = "ABC";
  if (check(a) == 1) {
    cout << a << endl;
  } else {
    while (next_permutation(a.begin(), a.end())) {
      for (int i = 0; i < a.size(); i++) {
        idx[a[i]] = i;
      }
      bool key = false;
      for (int i = 0; i < 3; i++) {
        int j = 0;
        if (idx[s[i][j]] - idx[s[i][j + 2]] < 0 && s[i][j + 1] == '<') {
          key = true;
        } else if (idx[s[i][j]] - idx[s[i][j + 2]] > 0 && s[i][j + 1] == '>') {
          key = true;
        } else {
          key = false;
          break;
        }
      }
      if (key == true) {
        result = a;
        res = true;
        break;
      }
      idx.clear();
    }
    if (res == true) {
      cout << result << endl;
    } else {
      cout << "Impossible" << endl;
    }
  }
  return 0;
}
