It's only after going through the entire word list printing "whatever begins with the same letter" are you in a position to say that NONE did, if that's that case. So you should put a flag inside that loop that gets set whenever a word is found. Then at the outside of that loop at the end, if that flag has never been touched, you can print out that "No letter begins with xxx"