#include <bits/stdc++.h>
using namespace std;
int main(void) {
  string op, an;
  int n, i, x;
  int maxn = 2000000000, minn = -2000000000;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> op >> x >> an;
    if (op == ">") {
      if (an == "Y") {
        x++;
        if (x > minn) minn = x;
      } else {
        if (x < maxn) maxn = x;
      }
    } else if (op == "<") {
      if (an == "Y") {
        x--;
        if (x < maxn) maxn = x;
      } else {
        if (x > minn) minn = x;
      }
    } else if (op == ">=") {
      if (an == "Y") {
        if (x > minn) minn = x;
      } else {
        x--;
        if (x < maxn) maxn = x;
      }
    } else if (op == "<=") {
      if (an == "Y") {
        if (x < maxn) maxn = x;
      } else {
        x++;
        if (x > minn) minn = x;
      }
    }
  }
  if (minn <= maxn)
    cout << minn << endl;
  else
    cout << "Impossible" << endl;
  return 0;
}
