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