f s i j = [c x | x <- [0 .. length s - 1]] where c n | n == i = s !! j | n == j = s !! i | otherwise = s !! n main = do s <- getLine [i, j] <- map read . words <$> getLine putStrLn $ f s i j