public static void main ( String [ ] args ) throws Exception {
  Scanner in = new Scanner ( System . in ) ;
  s1 = in . next ( ) . split ( "\\." ) ;
  s2 = in . next ( ) . split ( "\\." ) ;
  format . setLenient ( false ) ;
  for ( int i = 0 ;
  i < s2 . length ;
  i ++ ) ss2 [ i ] = Integer . parseInt ( s2 [ i ] ) ;
  Date d1 = format . parse ( s1 [ 0 ] + "/" + s1 [ 1 ] + "/20" + s1 [ 2 ] ) ;
  if ( val ( s2 [ 0 ] , s2 [ 1 ] , s2 [ 2 ] ) ) dates . add ( format . parse ( s2 [ 0 ] + "/" + s2 [ 1 ] + "/20" + s2 [ 2 ] ) ) ;
  ;
}

public static void main ( String [ ] args ) throws Exception { Scanner in = new Scanner ( System . in ) ; s1 = in . next ( ) . split ( " \\ . " ) ; s2 = in . next ( ) . split ( " \\ . " ) ; format . setLenient ( false ) ; for ( int i = 0 ; i < s2 . length ; i ++ ) ss2 [ i ] = Integer . parseInt ( s2 [ i ] ) ; Date d1 = format . parse ( s1 [ 0 ] + " / " + s1 [ 1 ] + " / 20" + s1 [ 2 ] ) ; if ( val ( s2 [ 0 ] , s2 [ 1 ] , s2 [ 2 ] ) ) dates . add ( format . parse ( s2 [ 0 ] + " / " + s2 [ 1 ] + " / 20" + s2 [ 2 ] ) ) ; ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) 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 (field_access object: (identifier) field: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) name: (identifier) arguments: (argument_list (string_literal))))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) name: (identifier) arguments: (argument_list (string_literal))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (false)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (field_access object: (identifier) field: (identifier))) update: (update_expression (identifier)) body: (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (identifier))))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (string_literal)) right: (array_access array: (identifier) index: (decimal_integer_literal))) right: (string_literal)) right: (array_access array: (identifier) index: (decimal_integer_literal))))))) (if_statement condition: (parenthesized_expression (method_invocation name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (decimal_integer_literal)) (array_access array: (identifier) index: (decimal_integer_literal)) (array_access array: (identifier) index: (decimal_integer_literal))))) consequence: (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (string_literal)) right: (array_access array: (identifier) index: (decimal_integer_literal))) right: (string_literal)) right: (array_access array: (identifier) index: (decimal_integer_literal)))))))))))