#include <bits/stdc++.h>
using namespace std;
deque<char> q;
int main() {
  string s1, s2, s3;
  cin >> s1 >> s2 >> s3;
  if (s1[1] == '<') {
    reverse(s1.begin(), s1.end());
    s1[1] = '>';
  }
  if (s2[1] == '<') {
    reverse(s2.begin(), s2.end());
    s2[1] = '>';
  }
  if (s3[1] == '<') {
    reverse(s3.begin(), s3.end());
    s3[1] = '>';
  }
  if (s1[2] == s2[0] && s2[2] == s3[0] || (s1[0] == s2[2] && s2[0] == s3[2]))
    cout << "Impossible\n";
  else if (s1[2] == s2[0])
    cout << s2[2] << s2[0] << s1[0] << endl;
  else if (s1[2] == s3[0])
    cout << s3[2] << s3[0] << s1[0] << endl;
  else if (s2[2] == s3[0])
    cout << s3[2] << s3[0] << s2[0] << endl;
  else if (s1[0] == s2[2])
    cout << s1[2] << s1[0] << s2[0] << endl;
  else if (s1[0] == s3[2])
    cout << s1[2] << s1[0] << s3[0] << endl;
  else if (s2[0] == s3[2])
    cout << s2[2] << s2[0] << s3[0] << endl;
  return 0;
}
