public static void main ( String [ ] args ) {
  FastReader fr = new FastReader ( ) ;
  int n = fr . nextInt ( ) , k = fr . nextInt ( ) ;
  int a = fr . nextInt ( ) , b = fr . nextInt ( ) , c = fr . nextInt ( ) , d = fr . nextInt ( ) ;
  if ( k < n + 1 || n == 4 ) {
    System . out . println ( "-1" ) ;
  }
  else {
    StringBuilder sb = new StringBuilder ( ) ;
    for ( int i = 1 ;
    i <= n ;
    i ++ ) {
      if ( i != a && i != b && i != c && i != d ) {
        sb . append ( i + " " ) ;
      }
    }
    String first = a + " " + c + " " + sb . toString ( ) + d + " " + b ;
    String second = c + " " + a + " " + sb . toString ( ) + b + " " + d ;
    System . out . println ( first ) ;
    System . out . println ( second ) ;
  }
}

public static void main ( String [ ] args ) { FastReader fr = new FastReader ( ) ; int n = fr . nextInt ( ) , k = fr . nextInt ( ) ; int a = fr . nextInt ( ) , b = fr . nextInt ( ) , c = fr . nextInt ( ) , d = fr . nextInt ( ) ; if ( k < n + 1 || n == 4 ) { System . out . println ( " - 1" ) ; } else { StringBuilder sb = new StringBuilder ( ) ; for ( int i = 1 ; i <= n ; i ++ ) { if ( i != a && i != b && i != c && i != d ) { sb . append ( i + " ▁ " ) ; } } String first = a + " ▁ " + c + " ▁ " + sb . toString ( ) + d + " ▁ " + b ; String second = c + " ▁ " + a + " ▁ " + sb . toString ( ) + b + " ▁ " + d ; System . out . println ( first ) ; System . out . println ( second ) ; } }
(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)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) 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))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal))))) alternative: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list)))) (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 (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier))) right: (binary_expression left: (identifier) right: (identifier))) right: (binary_expression left: (identifier) right: (identifier)))) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (string_literal))))))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (string_literal)) right: (identifier)) right: (string_literal)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) right: (identifier)) right: (string_literal)) right: (identifier)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (string_literal)) right: (identifier)) right: (string_literal)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) right: (identifier)) right: (string_literal)) right: (identifier)))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))))