Given a string, find the second appearance of every character.
Implement second_appearances(s). Return a map containing each character that appears at least twice, with its value equal to the 1-based position of that character's second appearance. Treat uppercase and lowercase characters as distinct, and include spaces or punctuation as characters.
def second_appearances(s):