Insert first 5 valid numbers
q = deque ( ) NEW_LINE q . append ( "1" ) NEW_LINE q . append ( "2" ) NEW_LINE q . append ( "3" ) NEW_LINE q . append ( "4" ) NEW_LINE q . append ( "5" ) NEW_LINE flag = True NEW_LINE