#include <bits/stdc++.h>
using namespace std;
int main() {
  int cnt = 0;
  bool flag = true;
  int low = -2000000000, high = 2000000000;
  bool lset = false;
  bool hset = false;
  cin >> cnt;
  for (int i = 1; i <= cnt; i++) {
    string str1, str2, str3;
    cin >> str1 >> str2 >> str3;
    stringstream stream(str2);
    int num;
    stream >> num;
    if (((str1 == ">") && (str3 == "Y")) || ((str1 == "<=") && (str3 == "N"))) {
      if (low <= num) {
        low = num + 1;
        lset = true;
      }
      if (lset && hset && (high < low || low > 2000000000)) {
        flag = false;
        break;
      }
    }
    if (((str1 == ">=") && (str3 == "Y")) || ((str1 == "<") && (str3 == "N"))) {
      if (low < num) {
        low = num;
        lset = true;
      }
      if (lset && hset && (high < low || low > 2000000000)) {
        flag = false;
        break;
      }
    }
    if (((str1 == "<=") && (str3 == "Y")) || ((str1 == ">") && (str3 == "N"))) {
      if (high > num) {
        high = num;
        hset = true;
      }
      if (lset && hset && (high < low || high < -2000000000)) {
        flag = false;
        break;
      }
    }
    if (((str1 == "<") && (str3 == "Y")) || ((str1 == ">=") && (str3 == "N"))) {
      if (high >= num) {
        high = num - 1;
        hset = true;
      }
      if (lset && hset && (high < low || high < -2000000000)) {
        flag = false;
        break;
      }
    }
  }
  if (flag && (!hset) && lset) cout << low << endl;
  if (flag && (!lset) && hset) cout << high << endl;
  if (flag && !lset && !hset) cout << "0" << endl;
  if (flag && lset && hset) cout << low << endl;
  if (!flag) cout << "Impossible" << endl;
}
