#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s;
  long long rab = -1, rac = -1, rbc = -1;
  cin >> s;
  long long flag = 0;
  if (s[1] == '<') {
    if (s[0] == 'A' && s[2] == 'B') rab = 0;
    if (s[0] == 'B' && s[2] == 'A') rab = 1;
    if (s[0] == 'A' && s[2] == 'C') rac = 0;
    if (s[0] == 'C' && s[2] == 'A') rac = 1;
    if (s[0] == 'B' && s[2] == 'C') rbc = 0;
    if (s[0] == 'C' && s[2] == 'B') rbc = 1;
  } else if (s[1] == '>') {
    if (s[0] == 'A' && s[2] == 'B') rab = 1;
    if (s[0] == 'B' && s[2] == 'A') rab = 0;
    if (s[0] == 'A' && s[2] == 'C') rac = 1;
    if (s[0] == 'C' && s[2] == 'A') rac = 0;
    if (s[0] == 'B' && s[2] == 'C') rbc = 1;
    if (s[0] == 'C' && s[2] == 'B') rbc = 0;
  }
  cin >> s;
  if (s[1] == '<') {
    if (s[0] == 'A' && s[2] == 'B') {
      if (rab != 1)
        rab = 0;
      else
        flag = 1;
    }
    if (s[0] == 'B' && s[2] == 'A') {
      if (rab != 0)
        rab = 1;
      else
        flag = 1;
    }
    if (s[0] == 'A' && s[2] == 'C') {
      if (rac != 1)
        rac = 0;
      else
        flag = 1;
    }
    if (s[0] == 'C' && s[2] == 'A') {
      if (rac != 0)
        rac = 1;
      else
        flag = 1;
    }
    if (s[0] == 'B' && s[2] == 'C') {
      if (rbc != 1)
        rbc = 0;
      else
        flag = 1;
    }
    if (s[0] == 'C' && s[2] == 'B') {
      if (rbc != 0)
        rbc = 1;
      else
        flag = 1;
    }
  }
  if (s[1] == '>') {
    if (s[0] == 'A' && s[2] == 'B') {
      if (rab != 0)
        rab = 1;
      else
        flag = 1;
    }
    if (s[0] == 'B' && s[2] == 'A') {
      if (rab != 1)
        rab = 0;
      else
        flag = 1;
    }
    if (s[0] == 'A' && s[2] == 'C') {
      if (rac != 0)
        rac = 1;
      else
        flag = 1;
    }
    if (s[0] == 'C' && s[2] == 'A') {
      if (rac != 1)
        rac = 0;
      else
        flag = 1;
    }
    if (s[0] == 'B' && s[2] == 'C') {
      if (rbc != 0)
        rbc = 1;
      else
        flag = 1;
    }
    if (s[0] == 'C' && s[2] == 'B') {
      if (rbc != 1)
        rbc = 0;
      else
        flag = 1;
    }
  }
  cin >> s;
  if (s[1] == '<') {
    if (s[0] == 'A' && s[2] == 'B') {
      if (rab != 1)
        rab = 0;
      else
        flag = 1;
    }
    if (s[0] == 'B' && s[2] == 'A') {
      if (rab != 0)
        rab = 1;
      else
        flag = 1;
    }
    if (s[0] == 'A' && s[2] == 'C') {
      if (rac != 1)
        rac = 0;
      else
        flag = 1;
    }
    if (s[0] == 'C' && s[2] == 'A') {
      if (rac != 0)
        rac = 1;
      else
        flag = 1;
    }
    if (s[0] == 'B' && s[2] == 'C') {
      if (rbc != 1)
        rbc = 0;
      else
        flag = 1;
    }
    if (s[0] == 'C' && s[2] == 'B') {
      if (rbc != 0)
        rbc = 1;
      else
        flag = 1;
    }
  }
  if (s[1] == '>') {
    if (s[0] == 'A' && s[2] == 'B') {
      if (rab != 0)
        rab = 1;
      else
        flag = 1;
    }
    if (s[0] == 'B' && s[2] == 'A') {
      if (rab != 1)
        rab = 0;
      else
        flag = 1;
    }
    if (s[0] == 'A' && s[2] == 'C') {
      if (rac != 0)
        rac = 1;
      else
        flag = 1;
    }
    if (s[0] == 'C' && s[2] == 'A') {
      if (rac != 1)
        rac = 0;
      else
        flag = 1;
    }
    if (s[0] == 'B' && s[2] == 'C') {
      if (rbc != 0)
        rbc = 1;
      else
        flag = 1;
    }
    if (s[0] == 'C' && s[2] == 'B') {
      if (rbc != 1)
        rbc = 0;
      else
        flag = 1;
    }
  }
  if (flag == 1)
    cout << "Impossible\n";
  else {
    if (rab == 1 && rac == 1 && rbc == 1)
      cout << "CBA\n";
    else if (rab == 1 && rac == 1 && rbc == 0)
      cout << "BCA\n";
    else if (rab == 0 && rac == 0 && rbc == 1)
      cout << "ACB\n";
    else if (rab == 0 && rac == 1 && rbc == 1)
      cout << "CAB\n";
    else if (rab == 0 && rac == 0 && rbc == 0)
      cout << "ABC\n";
    else if (rab == 1 && rac == 0 && rbc == 0)
      cout << "BAC\n";
    else
      cout << "Impossible\n";
  }
  return 0;
}
