public static void main ( String ... args ) throws IOException {
  Scanner sc = new Scanner ( new BufferedReader ( new InputStreamReader ( System . in ) ) ) ;
  PrintWriter out = new PrintWriter ( System . out ) ;
  int n = sc . nextInt ( ) , m = sc . nextInt ( ) ;
  for ( int i = 0 ;
  i < n ;
  ++ i ) {
    for ( int j = 0 ;
    j < n ;
    ++ j ) out . print ( i == j ? m + " " : "0 " ) ;
    out . println ( ) ;
  }
  out . flush ( ) ;
  out . close ( ) ;
}

public static void main ( String ... args ) throws IOException { Scanner sc = new Scanner ( new BufferedReader ( new InputStreamReader ( System . in ) ) ) ; PrintWriter out = new PrintWriter ( System . out ) ; int n = sc . nextInt ( ) , m = sc . nextInt ( ) ; for ( int i = 0 ; i < n ; ++ i ) { for ( int j = 0 ; j < n ; ++ j ) out . print ( i == j ? m + " ▁ " : "0 ▁ " ) ; out . println ( ) ; } out . flush ( ) ; out . close ( ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (spread_parameter (type_identifier) (variable_declarator name: (identifier)))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))))))) (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))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (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 (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: (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (ternary_expression condition: (binary_expression left: (identifier) right: (identifier)) consequence: (binary_expression left: (identifier) right: (string_literal)) alternative: (string_literal)))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))