#include <bits/stdc++.h>
using namespace std;
long long t, n, m, g = 0, o, k, f, z;
bool q = 1, e = 0;
double long y;
long long j, i, l, p;
vector<long long> visited(1e6, 0), vv(26, 0), v;
multiset<pair<int, int>> qq;
vector<int> w[10000];
string s, h, c;
char d, u = 'a';
int binaryToDecimal(string x) {
  bitset<64> bits(x);
  int number = bits.to_ulong();
  return number;
}
int dfs(int x) {
  visited[x] = 1;
  for (auto r : w[x]) {
    if (visited[r]) continue;
    l = l * 2;
    if (visited[r] == 0) dfs(r);
  }
  return l;
}
unordered_map<string, int> mp;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> s;
  s[1] == '>' ? vv[s[0] - 'A']++ : vv[s[2] - 'A']++;
  cin >> s;
  s[1] == '>' ? vv[s[0] - 'A']++ : vv[s[2] - 'A']++;
  cin >> s;
  s[1] == '>' ? vv[s[0] - 'A']++ : vv[s[2] - 'A']++;
  for (int i = 0; i < 3; i++) {
    if (vv[i] == 1) k++;
  }
  if (k == 3) {
    cout << "Impossible" << '\n';
    return 0;
  }
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < 3; j++) {
      if (vv[j] == i) cout << char(j + 'A');
    }
  }
  return 0;
}
