蹄鉄の釘が1本足りないばかりに、王国が失われた。昔からそう言い伝えられています。
入力のリストが与えられたら、それに対応することわざを生成します。
たとえば、リスト["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.
入力のリストはさまざまであることに注意してください。解答は、任意の長さと内容のリストを扱える必要があります。 出力テキストのどの行も、固定された変わらない文字列であってはなりません。すべてが与えられた入力に応じて変化する必要があります。