Print the sequence
for i in range ( n ) : NEW_LINE INDENT if ( str [ i ] == str [ 0 ] ) : NEW_LINE INDENT print ( ' ( ' , end = " " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( ' ) ' , end = " " ) NEW_LINE DEDENT DEDENT return NEW_LINE print ( " NO " , end = " " ) NEW_LINE