main :: IO ()
main = do
  s <- getLine
  putStrLn (f s)

f :: String -> String
f s
  | length s < 26 = g s
  | otherwise = reverse $ h (reverse $ s) []

g :: String -> String
g s = let x = head $ filter (`notElem` s) ['a'..'z']
      in s ++ [x]

h :: String -> String -> String
h []    _ = "-1"
h (c:t) acc = let ts = filter (> c) acc
              in
                if null ts
                then h t (c:acc)
                else let c = minimum ts
                     in c:t

