public static void main ( String [ ] args ) {
  A = sc . nextInt ( ) ;
  B = sc . nextInt ( ) ;
  N = A + B ;
  if ( A <= B ) {
    System . out . println ( "Impossible" ) ;
    return ;
  }
  int start = 0 ;
  int restA = A ;
  int honest = - 1 ;
  OUT : while ( true ) {
    if ( start == N - 1 ) {
      honest = start ;
      break ;
    }
    int cur = start ;
    int next = cur + 1 ;
    int count = 1 ;
    while ( true ) {
      boolean res = query ( cur , next ) ;
      if ( res ) {
        ++ count ;
        if ( count == restA ) {
          honest = next ;
          break OUT ;
        }
        else {
          cur = next ;
          next = cur + 1 ;
        }
      }
      else {
        if ( next - start + 1 >= count * 2 ) {
          start = next + 1 ;
          restA -= count ;
          break ;
        }
        next ++ ;
      }
    }
  }
  int [ ] result = new int [ N ] ;
  for ( int i = 0 ;
  i < N ;
  i ++ ) {
    result [ i ] = query ( honest , i ) ? 1 : 0 ;
  }
  System . out . print ( "! " ) ;
  for ( int i = 0 ;
  i < N ;
  i ++ ) {
    System . out . print ( result [ i ] ) ;
  }
  System . out . println ( ) ;
}

public static void main ( String [ ] args ) { A = sc . nextInt ( ) ; B = sc . nextInt ( ) ; N = A + B ; if ( A <= B ) { System . out . println ( " Impossible " ) ; return ; } int start = 0 ; int restA = A ; int honest = - 1 ; OUT : while ( true ) { if ( start == N - 1 ) { honest = start ; break ; } int cur = start ; int next = cur + 1 ; int count = 1 ; while ( true ) { boolean res = query ( cur , next ) ; if ( res ) { ++ count ; if ( count == restA ) { honest = next ; break OUT ; } else { cur = next ; next = cur + 1 ; } } else { if ( next - start + 1 >= count * 2 ) { start = next + 1 ; restA -= count ; break ; } next ++ ; } } } int [ ] result = new int [ N ] ; for ( int i = 0 ; i < N ; i ++ ) { result [ i ] = query ( honest , i ) ? 1 : 0 ; } System . out . print ( " ! ▁ " ) ; for ( int i = 0 ; i < N ; i ++ ) { System . out . print ( result [ i ] ) ; } System . out . println ( ) ; }
(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 (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (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)))) (return_statement))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (unary_expression operand: (decimal_integer_literal)))) (labeled_statement (identifier) (while_statement condition: (parenthesized_expression (true)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))) (break_statement))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (decimal_integer_literal)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (true)) body: (block (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (block (expression_statement (update_expression (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))) (break_statement (identifier))) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal))))))) alternative: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (break_statement))) (expression_statement (update_expression (identifier)))))))))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (identifier))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (ternary_expression condition: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier))) consequence: (decimal_integer_literal) alternative: (decimal_integer_literal)))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (identifier))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list)))))