object Main extends App {
	val s = scala.io.StdIn.readLine.toList
	var a = List('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
				'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z')

	if(s.size < 26){
		for(x<- s){
			a = a.filter(_ != x)
		}

		println(s.mkString + a.head)
	}else{
		var tp = List[Char]()
		var ans = List[Char]()
		var flag = false

		for(x <- s){
			if(x == 'z'){
				flag = true
			}

			if(flag){
				tp = x::tp
			}else{
				ans = x::ans
			}
		}

		if(tp.size == 26){
			println(-1)
		}else{
			ans = ans.tail

			tp = tp.sorted
			ans = ans.reverse

			println(ans.mkString + tp.head)
		}


	}

}