n,_=gets.chop,gets n=($_.split-n)[1]if$_[n]while gets $><