Check if the element exists in the map
if ( mp [ s1 ] >= 2 ) : NEW_LINE INDENT mp [ s1 ] = mp [ s1 ] - 2 ; NEW_LINE DEDENT else : NEW_LINE INDENT isArrayPossible = False ; NEW_LINE DEDENT if ( isArrayPossible ) : NEW_LINE INDENT for first , second in mp . items ( ) : NEW_LINE DEDENT