Write a program that will search for mentions of names (both single names and full names) in the text. If the text contains a name and surname one immediately followed by the other, it should be one match. That is, the name we need to find is either only one word or two words located one after the other (the first and last names of a person).
In this task, first and last names are words beginning with a capital letter.
See the example for better understanding of the task.