#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
vector<char> vect[3];
bool visited[3], rec[3];
vector<int> res;
bool ans = true;
void dfs(int sv) {
  visited[sv] = 1;
  rec[sv] = 1;
  for (int i : vect[sv]) {
    if (!visited[i]) {
      dfs(i);
    } else {
      if (rec[i]) {
        ans = false;
      }
    }
  }
  rec[sv] = 0;
  res.push_back(sv);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  for (int i = 0; i < 3; ++i) {
    string s;
    cin >> s;
    char op = s[1];
    if (op == '>') {
      vect[s[0] - 'A'].push_back(s[2] - 'A');
    } else {
      vect[s[2] - 'A'].push_back(s[0] - 'A');
    }
  }
  for (int i = 0; i < 3; ++i) {
    if (!visited[i]) {
      dfs(i);
    }
  }
  if (ans) {
    for (int i = 0; i < 3; ++i) {
      cout << char(res[i] + 'A');
    }
    cout << '\n';
  } else {
    cout << "Impossible\n";
  }
  return 0;
}
