main = do [name,t,u] <- words <$> getLine putStrLn $ map snd $ filter (flip notElem [read t, read u] . fst) $ zip [0..] name