#include <bits/stdc++.h>
using namespace std;
void minimize(int &a, int b) { a = std::min(a, b); }
void maximize(int &a, int b) { a = std::max(a, b); }
void solve() {
  int mx = 2 * 1000 * 1000 * 1000;
  int mn = -mx;
  int n;
  cin >> n;
  while (n-- > 0) {
    string s;
    cin >> s;
    int first;
    cin >> first;
    string ans;
    cin >> ans;
    if (ans == "N") {
      if (s == ">=")
        s = "<";
      else if (s == "<")
        s = ">=";
      else if (s == "<=")
        s = ">";
      else
        s = "<=";
    }
    if (s == ">=")
      maximize(mn, first);
    else if (s == ">")
      maximize(mn, first + 1);
    else if (s == "<=")
      minimize(mx, first);
    else
      minimize(mx, first - 1);
  }
  if (mn <= mx)
    cout << mn;
  else
    cout << "Impossible";
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
