static Node modularNode ( Node head , int k ) {
  if ( k <= 0 || head == null ) return null ;
  int i = 1 ;
  Node modularNode = null ;
  for ( Node temp = head ;
  temp != null ;
  temp = temp . next ) {
    if ( i % k == 0 ) modularNode = temp ;
    i ++ ;
  }
  return modularNode ;
}

static Node modularNode ( Node head , int k ) { if ( k <= 0 || head == null ) return null ; int i = 1 ; Node modularNode = null ; for ( Node temp = head ; temp != null ; temp = temp . next ) { if ( i % k == 0 ) modularNode = temp ; i ++ ; } return modularNode ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (null_literal)))) consequence: (return_statement (null_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (null_literal))) (for_statement init: (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (identifier))) condition: (binary_expression left: (identifier) right: (null_literal)) update: (assignment_expression left: (identifier) right: (field_access object: (identifier) field: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (identifier)))) (expression_statement (update_expression (identifier))))) (return_statement (identifier))))