Last letter-first letter

FCC link

A certain children's game involves starting with a word in a particular category. Each participant in turn says a word, but that word must begin with the final letter of the previous word. Once a word has been given, it cannot be repeated. If an opponent cannot give a word in the category, they fall out of the game.

For example, with "animals" as the category,

Child 1: dog Child 2: goldfish Child 1: hippopotamus Child 2: snake ...

Test

{{test}}

Console output