Checking if the reverse of the string is already present in the set
elif ( t in d ) : NEW_LINE INDENT left . append ( S [ i ] ) NEW_LINE right . append ( t ) NEW_LINE d . remove ( S [ i ] ) NEW_LINE d . remove ( t ) NEW_LINE DEDENT printPalindrome ( left , mid , right ) NEW_LINE