Problem:
Score : 200 points

Problem Statement

You are given a string S consisting of lowercase English letters.
Find the lexicographically (alphabetically) smallest lowercase English letter that does not occur in S.
If every lowercase English letter occurs in S, print None instead.

Constraints

1 \leq |S| \leq 10^5 (|S| is the length of string S.)

S consists of lowercase English letters.

Input

Input is given from Standard Input in the following format:

S

Output

Print the lexicographically smallest lowercase English letter that does not occur in S.
If every lowercase English letter occurs in S, print None instead.

Sample Input 1

atcoderregularcontest

Sample Output 1

b

The string atcoderregularcontest contains a, but does not contain b.

Sample Input 2

abcdefghijklmnopqrstuvwxyz

Sample Output 2

None

This string contains every lowercase English letter.

Sample Input 3

fajsonlslfepbjtsaayxbymeskptcumtwrmkkinjxnnucagfrg

Sample Output 3

d

Solution in OCaml (4.02.3) (judge verdict: Accepted)

open Batteries

let ( ++ ) x y = int_of_char x + y |> char_of_int

let () =
  Scanf.scanf "%s\n" String.to_list
  |> List.sort_uniq compare
  |> List.fold_left (fun x y -> if x = y then x ++ 1 else x) 'a'
  |> (fun x -> if x > 'z' then "None" else String.of_char x)
  |> print_endline