#include <bits/stdc++.h>
using namespace std;
int l, L, r, R;
void intersect(int l1, int r1, int l2, int r2) {
  l = max(l1, l2), r = min(r1, r2);
}
int main() {
  l = -2 * (int)(1e9), r = -l;
  L = l, R = r;
  int n;
  scanf("%d\n", &n);
  for (int i = 1; i <= n; ++i) {
    string s;
    int v;
    char F;
    cin >> s >> v >> F;
    bool f = (F == 'Y');
    if (s == ">") {
      if (f == true)
        intersect(l, r, v + 1, R);
      else
        intersect(l, r, L, v);
    } else if (s == "<") {
      if (f == true)
        intersect(l, r, L, v - 1);
      else
        intersect(l, r, v, R);
    } else if (s == ">=") {
      if (f == true)
        intersect(l, r, v, R);
      else
        intersect(l, r, L, v - 1);
    } else {
      if (f == true)
        intersect(l, r, L, v);
      else
        intersect(l, r, v + 1, R);
    }
  }
  if (l <= r)
    cout << l << endl;
  else
    cout << "Impossible" << endl;
  return 0;
}
