r=io.read s=' 'k=s..r()..s for i=1,300 do x=r()..''print(x)x=k:find(s..i..s)and print(x)end