import Data.List

main = do
  s <- getLine

  putStrLn $ solve s

  where
    solve s
      | length s < 26 = s ++ [head $ ['a'..'z'] \\ s]
      | length s == 26 = aux (reverse s) []
      where
        aux [] _ = show (-1)
        aux (c:cs) xs = if null f then aux cs (c:xs) else reverse $ (head f) : cs
          where f = sort $ filter (>c) xs
