import Control.Monad(replicateM)
main = do
    [_,n] <- map read . words <$> getLine :: IO [Int]
    a <- map read . words <$> getLine :: IO [Int]
    xs <- (++a) <$> (replcateM n-1 readLn)
    print xs