#include <bits/stdc++.h>
using namespace std;
void addEdge(int u, int v, vector<int> adj[]) { adj[u].push_back(v); }
void saddEdge(string a, vector<int> adj[]) {
  map<char, int> test;
  test['A'] = 0;
  test['B'] = 1;
  test['C'] = 2;
  if (a[1] == '>') {
    addEdge(test[a[0]], test[a[2]], adj);
  } else
    addEdge(test[a[2]], test[a[0]], adj);
}
void topo(int v, vector<int> adj[]) {
  vector<int> indegree(v, 0);
  for (int i = 0; i < v; i++) {
    for (int j = 0; j < adj[i].size(); j++) {
      indegree[adj[i][j]]++;
    }
  }
  queue<int> order;
  for (int i = 0; i < indegree.size(); i++) {
    if (indegree[i] == 0) order.push(i);
  }
  vector<int> visitOrder;
  int count = 0;
  while (!order.empty()) {
    count++;
    int vt = order.front();
    order.pop();
    visitOrder.push_back(vt);
    for (int i = 0; i < adj[vt].size(); i++) {
      indegree[adj[vt][i]]--;
      if (indegree[adj[vt][i]] == 0) {
        order.push(adj[vt][i]);
      }
    }
  }
  if (count != v) {
    cout << "Impossible" << endl;
  } else {
    map<int, char> rtest;
    rtest[0] = 'A';
    rtest[1] = 'B';
    rtest[2] = 'C';
    while (!visitOrder.empty()) {
      int t = visitOrder.back();
      visitOrder.pop_back();
      cout << rtest[t];
    }
    cout << endl;
  }
}
int main() {
  int d, e, f, h, n, m, t;
  string a, b, c;
  cin >> a >> b >> c;
  int v = 3;
  vector<int> adj[v];
  saddEdge(a, adj);
  saddEdge(b, adj);
  saddEdge(c, adj);
  topo(v, adj);
  return 0;
}
