#include <bits/stdc++.h>
using namespace std;
int main() {
  string ss, ss1, ss2;
  cin >> ss >> ss1 >> ss2;
  string s = "";
  string s1 = "";
  string s2 = "";
  if (ss[1] == '>')
    s += ss;
  else {
    s += ss[2];
    s += '>';
    s += ss[0];
  }
  if (ss1[1] == '>')
    s1 += ss1;
  else {
    s1 += ss1[2];
    s1 += '>';
    s1 += ss1[0];
  }
  if (ss2[1] == '>')
    s2 += ss2;
  else {
    s2 += ss2[2];
    s2 += '>';
    s2 += ss2[0];
  }
  if (s[0] == s1[0])
    cout << s2[2] << s2[0] << s[0];
  else if (s[0] == s2[0])
    cout << s1[2] << s1[0] << s[0];
  else if (s1[0] == s2[0])
    cout << s[2] << s[0] << s1[0];
  else
    cout << "Impossible";
  return 0;
}
