#include <bits/stdc++.h>   using namespace std;   int main() {     int n, x, y, large = 2000000000, small = -2000000000;     string s1, s2;     cin >> n;     for (int i = 0; i < n; i++) {       cin >> s1 >> x >> s2;       if ((s1 ==  >  && s2 ==  Y ) || (s1 ==  <=  && s2 ==  N )) {         if (x >= small) {           small = x + 1;         }       } else if ((s1 ==  <  && s2 ==  Y ) || (s1 ==  >=  && s2 ==  N )) {         if (x <= large) {           large = x - 1;         }       } else if ((s1 ==  >=  && s2 ==  Y ) || (s1 ==  <  && s2 ==  N )) {         if (x >= small) {           small = x;         }       } else {         if (x <= large) {           large = x;         }       }     }     if (small > large) {       cout <<  Impossible ;     } else {       cout << small;     }     return (0);   }   