main = do first <- getLine second <- getLine let [_, k] = words first let xs = filter (/=k) $ words second sequence $ map putStr $ map (++ " ") xs