#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const double pi = acos(-1.0);
const long long MOD = 1000000007;
int N;
char str[10];
char ans[10];
int X;
int main() {
  while (scanf("%d", &N) != EOF) {
    int l = -2000000000;
    int r = 2000000000;
    for (int i = 1; i <= N; i++) {
      scanf("%s%d%s", str, &X, ans);
      if (ans[0] == 'Y') {
        if (str[0] == '>' && str[1] == '=') {
          if (l < X) l = X;
        } else if (str[0] == '<' && str[1] == '=') {
          if (r > X) r = X;
        } else if (str[0] == '>') {
          if (l < X + 1) l = X + 1;
        } else if (str[0] == '<') {
          if (r > X - 1) r = X - 1;
        }
      } else if (ans[0] == 'N') {
        if (str[0] == '>' && str[1] == '=') {
          if (r > X - 1) r = X - 1;
        } else if (str[0] == '<' && str[1] == '=') {
          if (l < X + 1) l = X + 1;
        } else if (str[0] == '>') {
          if (r > X) r = X;
        } else if (str[0] == '<') {
          if (l < X) l = X;
        }
      }
    }
    if (l <= r)
      printf("%d\n", r);
    else
      printf("Impossible\n");
  }
  return 0;
}
