Charlie's Birthday Puzzle Solution