#include <bits/stdc++.h>
using namespace std;
mt19937_64 rang(
    chrono::high_resolution_clock::now().time_since_epoch().count());
int rng(int lim) {
  uniform_int_distribution<int> uid(0, lim - 1);
  return uid(rang);
}
void init_code() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  srand(chrono::high_resolution_clock::now().time_since_epoch().count());
}
string solution() {
  map<char, vector<char>> graph;
  int count = 0;
  for (int i = 0; i < 3; i++) {
    string s;
    cin >> s;
    char X, Y;
    if (s[1] == '>')
      X = s[0], Y = s[2];
    else
      X = s[2], Y = s[0];
    for (char &i : graph[Y]) {
      if (i == X) return "Impossible";
    }
    graph[X].push_back(Y);
    if (graph[X].size() == 1)
      count++;
    else {
      if (graph[X].size() > 1) count--;
    }
  }
  if (count == 3) return "Impossible";
  vector<pair<int, char>> ans;
  for (auto it : graph) {
    ans.push_back({it.second.size(), it.first});
  }
  sort(ans.begin(), ans.end());
  string res;
  for (auto it : ans) res.push_back(it.second);
  return res;
}
int main() {
  init_code();
  int t = 1;
  while (t--) {
    cout << solution();
  }
  return 0;
}
