main=interact$f.lines f(_:x@(_:_:_))=f$init x f x=unlines x