말굽 못 하나가 없어서 나라를 잃었다는 말이 있어요.
입력 목록이 주어지면, 그에 맞는 속담을 만들어요.
예를 들어 ["nail", "shoe", "horse", "rider", "message", "battle", "kingdom"] 목록이 주어지면, 이 속담 운율의 전체 텍스트를 출력해요:
For want of a nail the shoe was lost.
For want of a shoe the horse was lost.
For want of a horse the rider was lost.
For want of a rider the message was lost.
For want of a message the battle was lost.
For want of a battle the kingdom was lost.
And all for the want of a nail.
입력 목록은 달라질 수 있다는 점을 기억해요. 풀이는 임의의 길이와 내용을 가진 목록도 처리할 수 있어야 해요. 출력 텍스트의 어떤 줄도 고정되어 변하지 않는 문자열이면 안 돼요. 모든 줄은 주어진 입력에 따라 달라져야 해요.