Check if both left and right parts are present in a [ ]
if ( cnt [ left ] == 1 and cnt [ right ] == 1 ) : NEW_LINE INDENT ans = False NEW_LINE print ( b [ i ] , end = " ▁ " ) NEW_LINE DEDENT if ( ans ) : NEW_LINE print ( " - 1" ) NEW_LINE