#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, o;
  bool imp = false;
  for (int j = 0; j < 3; j++) {
    cin >> o;
    std::size_t found = s.find(o[0]);
    std::size_t found2 = s.find(o[2]);
    if (found != std::string::npos && found2 != std::string::npos) {
      if ((o[1] == '<' && found > found2) || (o[1] == '>' && found < found2)) {
        if (abs(int(found) - int(found2)) == 1) {
          char c = s[found];
          s[found] = s[found2];
          s[found2] = c;
        } else {
          imp = true;
          break;
        }
      }
    } else if (found != std::string::npos && found2 == std::string::npos) {
      if (o[1] == '<')
        s.insert(found + 1, 1, o[2]);
      else
        s.insert(found, 1, o[2]);
    } else if (found == std::string::npos && found2 != std::string::npos) {
      if (o[1] == '<')
        s.insert(found2, 1, o[0]);
      else
        s.insert(found2 + 1, 1, o[0]);
    } else {
      if (o[1] == '<') {
        s.push_back(o[0]);
        s.push_back(o[2]);
      } else {
        s.push_back(o[2]);
        s.push_back(o[0]);
      }
    }
  }
  if (!imp)
    cout << s;
  else
    cout << "Impossible";
  return 0;
}
