import Control.Arrow import Data.List deleteAt :: Int -> [a] -> [a] deleteAt n xs = fst spl ++ tail (snd spl) where spl = splitAt n xs main = do [s, t, u] <- getLine >>= return . words putStrLn $ (deleteAt (read t) &&& deleteAt (read u) >>> uncurry intersect) s