public static void main ( String [ ] args ) {
  Scanner sc = new Scanner ( System . in ) ;
  int t = sc . nextInt ( ) ;
  long min = - 2000000000L , max = 2000000000L ;
  while ( t -- > 0 ) {
    String sign = sc . next ( ) ;
    long n = sc . nextLong ( ) ;
    char ans = sc . next ( ) . charAt ( 0 ) ;
    switch ( sign ) {
      case ">" : if ( ans == 'Y' ) {
        min = Math . max ( min , n + 1 ) ;
      }
      else {
        max = Math . min ( max , n ) ;
      }
      break ;
      case "<" : if ( ans == 'Y' ) {
        max = Math . min ( max , n - 1 ) ;
      }
      else {
        min = Math . max ( min , n ) ;
      }
      break ;
      case ">=" : if ( ans == 'Y' ) {
        min = Math . max ( min , n ) ;
      }
      else {
        max = Math . min ( max , n - 1 ) ;
      }
      break ;
      case "<=" : if ( ans == 'Y' ) {
        max = Math . min ( max , n ) ;
      }
      else {
        min = Math . max ( min , n + 1 ) ;
      }
      break ;
    }
  }
  if ( min > max ) {
    System . out . println ( "Impossible" ) ;
  }
  else {
    System . out . println ( min ) ;
  }
}

public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; long min = - 2000000000L , max = 2000000000L ; while ( t -- > 0 ) { String sign = sc . next ( ) ; long n = sc . nextLong ( ) ; char ans = sc . next ( ) . charAt ( 0 ) ; switch ( sign ) { case " > " : if ( ans == ' Y ' ) { min = Math . max ( min , n + 1 ) ; } else { max = Math . min ( max , n ) ; } break ; case " < " : if ( ans == ' Y ' ) { max = Math . min ( max , n - 1 ) ; } else { min = Math . max ( min , n ) ; } break ; case " > = " : if ( ans == ' Y ' ) { min = Math . max ( min , n ) ; } else { max = Math . min ( max , n - 1 ) ; } break ; case " < = " : if ( ans == ' Y ' ) { max = Math . min ( max , n ) ; } else { min = Math . max ( min , n + 1 ) ; } break ; } } if ( min > max ) { System . out . println ( " Impossible " ) ; } else { System . out . println ( min ) ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (unary_expression operand: (decimal_integer_literal))) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (update_expression (identifier)) right: (decimal_integer_literal))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) name: (identifier) arguments: (argument_list (decimal_integer_literal))))) (switch_expression condition: (parenthesized_expression (identifier)) body: (switch_block (switch_block_statement_group (switch_label (string_literal)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (character_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal))))))) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier))))))) (break_statement)) (switch_block_statement_group (switch_label (string_literal)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (character_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal))))))) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier))))))) (break_statement)) (switch_block_statement_group (switch_label (string_literal)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (character_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier)))))) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal)))))))) (break_statement)) (switch_block_statement_group (switch_label (string_literal)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (character_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier)))))) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal)))))))) (break_statement)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal))))) alternative: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))))