#include <bits/stdc++.h>
using namespace std;
vector<int> adj[4];
bool isCyclic(int curr, bool vis[]) {
  if (!vis[curr]) {
    vis[curr] = true;
    for (int i = 0; i < adj[curr].size(); i++) {
      if (!vis[adj[curr][i]] && isCyclic(adj[curr][i], vis))
        return true;
      else if (vis[adj[curr][i]])
        return true;
    }
  }
  vis[curr] = false;
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cout.tie(NULL);
  cin.tie(NULL);
  ;
  for (int i = 0; i < 3; i++) {
    string str;
    cin >> str;
    char a = str[0], b = str[2], c = str[1];
    if (c == '<') {
      adj[b - 'A' + 1].push_back(a - 'A' + 1);
    } else {
      adj[a - 'A' + 1].push_back(b - 'A' + 1);
    }
  }
  bool vis[4];
  int ind[4];
  for (int i = 0; i < 4; i++) {
    vis[i] = false;
    ind[i] = 0;
  }
  for (int i = 1; i <= 3; i++) {
    for (int j = 0; j < adj[i].size(); j++) {
      ind[adj[i][j]]++;
    }
  }
  if (isCyclic(1, vis)) {
    cout << "Impossible" << endl;
  } else {
    queue<int> que;
    for (int i = 1; i <= 3; i++) {
      if (ind[i] == 0) {
        que.push(i);
        vis[i] = true;
      }
    }
    vector<int> v;
    while (!que.empty()) {
      int curr = que.front();
      vis[curr] = true;
      v.push_back(curr);
      que.pop();
      for (int i = 0; i < adj[curr].size(); i++) {
        if (!vis[adj[curr][i]] && ind[adj[curr][i]]) {
          ind[adj[curr][i]]--;
          if (ind[adj[curr][i]] == 0) {
            que.push(adj[curr][i]);
          }
        }
      }
    }
    reverse(v.begin(), v.end());
    for (int i = 0; i < v.size(); i++) {
      if (v[i] == 1) {
        cout << "A";
      } else if (v[i] == 2) {
        cout << "B";
      } else {
        cout << "C";
      }
    }
  }
  return 0;
}
