#include <bits/stdc++.h>
using namespace std;
int n;
char s[100];
char x[100], y[100];
void input() {
  int maxx, minn, i, in;
  maxx = 2000000000;
  minn = -2000000000;
  gets(s);
  for (i = 0; i < n; i++) {
    gets(s);
    sscanf(s,
           "%s"
           "%d"
           "%s",
           &x, &in, &y);
    if (y[0] == 'N') {
      if (strcmp(x, ">") == 0) maxx = min(maxx, in);
      if (strcmp(x, ">=") == 0) maxx = min(maxx, in - 1);
      if (strcmp(x, "<") == 0) minn = max(minn, in);
      if (strcmp(x, "<=") == 0) minn = max(minn, in + 1);
    } else {
      if (strcmp(x, "<=") == 0) maxx = min(maxx, in);
      if (strcmp(x, "<") == 0) maxx = min(maxx, in - 1);
      if (strcmp(x, ">=") == 0) minn = max(minn, in);
      if (strcmp(x, ">") == 0) minn = max(minn, in + 1);
    }
  }
  for (i = minn; i <= maxx; i++) {
    printf("%d\n", i);
    return;
  }
  printf("Impossible\n");
}
int main() {
  while (scanf("%d", &n) > 0) {
    input();
  }
  return 0;
}
