Periods and commas go inside of quotes WITHOUT ANY EXCEPTIONS in the entire language. Whether it is one word or one letter or a number or a long quote, the period and the comma go inside.
...When you added the letter "s," did it make a difference?
...When she said, "You have to leave me alone," what was your response?
...You used the word "hero."
...That number ends in "749."
Happy punctuating!
Margie