rInt :: String -> Int rInt = read xys x y = if x < y then [x, y] else [y, x] solve ss x y | x == y = s1 ++ s2 | otherwise = s1 ++ s3 ++ s4 where z = y - x - 1 s1 = take x ss s2 = tail $ drop x ss s3 = take z s2 s4 = tail $ drop z s2 main = do [ss, t, u] <- words <$> getLine let [x, y] = xys (rInt t) (rInt u) putStrLn $ solve ss x y