class Main def start main(input) end private def main(s) for i in 1...1000 x = "a" * i if not s.include?(x) puts x break end end end def input gets end end Main.new.start