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



Sample input:
atcoderregularcontest


Sample output:
b

Submission status: Accepted

Solution code:
S = input()
i = ord("a")

flag = 0

for i in range(i, i+ 26):
  if(chr(i) not in S):
    print(chr(i))
    flag = 1
    break
    
if(flag == 0):
  print("None")

Submission status: Accepted

Solution code:
s=set(input())
w="abcdefghijklmnopqrstuvwxyz"
ans=sorted(set(w)^s)
print("None" if len(ans)==0 else ans[0])

Submission status: Accepted

Solution code:
#ABC071-B
s = input()

s_set = set(s)
alphabet = "abcdefghijklmnopqrstuvwxyz"
flg = False
for i in range(len(alphabet)):
    if not alphabet[i] in s_set:
        print(alphabet[i])
        flg = True
        break
if not flg:
    print(None)

Submission status: Accepted

Solution code:
print(min(set(map(chr,range(97,123)))-set(input())or[None]))

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

# In[24]:


# S = input()


# In[25]:


# mylist = list(sorted(set(S)))
# abc = "abcdefghijklmnopqrstuvwxyz"
# for i in range(len(abc)):
#     if mylist[i] != abc[i]:
#         print(abc[i])
#         break
# else:
#     print("None")


# In[ ]:


s = input()
chars = set('abcdefghijklmnopqrstuvxwyz')
x = list(sorted(chars - set(s)))
if len(x):
    print(x[0])
else:
    print('None')

Submission status: Accepted

Solution code:
s=input()
x=ord('a')
z=0
for i in range(x,x+26):
    y=chr(i)
    if y not in s:
        print(y)
        z=1
        break
if z==0:
    print('None')

Submission status: Accepted

Solution code:
s = input()
chars = set('abcdefghijklmnopqrstuvxwyz')
x = list(sorted(chars - set(s)))
if len(x):
    print(x[0])
else:
    print('None')

Submission status: Accepted

Solution code:
def main():
    S = input()
    A = [False]*26
    a = ord("a")
    for char in S:
        A[ord(char) - a] = True
    for i in range(26):
        if not A[i]:
            print(chr(i+a))
            return
    print("None")

main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
from collections import defaultdict, deque
# def input(): return sys.stdin.readline()[:-1] # warning not \n
# def input(): return sys.stdin.buffer.readline()[:-1]


def solve():
    s = set([x for x in input()])
    for i in range(26):
        e = chr(ord('a') + i)
        if e not in s:
            print(e)
            return
    print('None')
        
t = 1
# t = int(input())
for case in range(1,t+1):
    ans = solve()



"""

1 4
7
RRRR
1 1 0 1
----
4

1 4
47
RCRR
1 1 0 1
----
-1

2 2
10
RR
RR
1 7
4 1
----
4

2 2
10
RR
RR
7 4
7 4
----
-1

3 3
8
RCR
RRC
RRR
1 1 1
1 1 1
1 3 1


3 3
1
RCR
RRC
RRR
1 1 1
1 1 1
1 3 1


"""

Submission status: Accepted

Solution code:
S = list(input())
S. sort()

a = ord("a")
z = ord("z")
X = []
for i in range(len(S)):
  X.append(ord(S[i]))

for j in range(a,z+1):
  if j not in X:
    print(chr(j))
    exit()
    
print("None")

Submission status: Accepted

Solution code:
S=input()
L=("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")
for l in L:
    if S.count(l)>0:
        pass
    else:
        print(l)
        exit()
else:
    print("None")

Submission status: Accepted

Solution code:
import math
from collections import deque
from collections import defaultdict

import bisect

#自作関数群
def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):#階乗
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):#コンビネーション
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def combmod(n,r,mod):
	return (fact(n)/fact(n-r)*pow(fact(r),mod-2,mod))%mod
def printQueue(q):
	r=copyQueue(q)
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): # root
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): # much time
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} # 1~n
def bitArr(n):#ビット全探索
	x = 1
	zero = "0"*n
	ans = []
	ans.append([0]*n)
	for i in range(2**n-1):
		ans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))
		x+=1
	return ans;
def arrsSum(a1,a2):
	for i in range(len(a1)):
		a1[i]+=a2[i]
	return a1
def maxValue(a,b,v):
	v2 = v
	for i in range(v2,-1,-1):
		for j in range(v2//a+1): #j:aの個数
			k = i-a*j
			if k%b==0:
				return i
	return -1
def copyQueue(q):
	nq = queue.Queue()
	n = q.qsize()
	for i in range(n):
		x = q.get()
		q.put(x)
		nq.put(x)
	return nq
def get_sieve_of_eratosthenes(n):
	#data = [2]
	data = [0,0,0]
	for i in range(3,n+1,2):
		data.append(i)
		data.append(0)
	for i in range(len(data)):
		interval = data[i]
		if interval!=0:
			for j in range(i+interval,n-1,interval):
				data[j] = 0
	#ans = [x for x in data if x!=0]
	ans = data[:]
	return ans

def isInt(n):
	if isinstance(n, int):
		return True
	else:
		return n.is_integer()

s = readChar()

ex = set()

for i in s:
	ex.add(i)

al = ["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"]

for i in range(len(ex)):
	al.remove(ex.pop())

if len(al)==0:
	print("None")
else:
	print(al[0])

Submission status: Accepted

Solution code:
from collections import Counter
s = input()

b = Counter(s)

z = [0] * 26
for items,values in b.items():
    z[ord(items)- 97] = 1

for i in range(26):
    if z[i] == 0:
        print(chr(i+97))
        exit(0)
print("None")

Submission status: Accepted

Solution code:
def counting_sort(array,max):
    bucket = [0] * (max+1)

    for i in range(len(array)):
        if array[i] == 'a':
            bucket[0] += 1
        elif array[i] == 'b':
            bucket[1] += 1
        elif array[i] == 'c':
            bucket[2] += 1
        elif array[i] == 'd':
            bucket[3] += 1
        elif array[i] == 'e':
            bucket[4] += 1
        elif array[i] == 'f':
            bucket[5] += 1
        elif array[i] == 'g':
            bucket[6] += 1
        elif array[i] == 'h':
            bucket[7] += 1
        elif array[i] == 'i':
            bucket[8] += 1
        elif array[i] == 'j':
            bucket[9] += 1
        elif array[i] == 'k':
            bucket[10] += 1
        elif array[i] == 'l':
            bucket[11] += 1
        elif array[i] == 'm':
            bucket[12] += 1
        elif array[i] == 'n':
            bucket[13] += 1
        elif array[i] == 'o':
            bucket[14] += 1
        elif array[i] == 'p':
            bucket[15] += 1
        elif array[i] == 'q':
            bucket[16] += 1
        elif array[i] == 'r':
            bucket[17] += 1
        elif array[i] == 's':
            bucket[18] += 1
        elif array[i] == 't':
            bucket[19] += 1
        elif array[i] == 'u':
            bucket[20] += 1
        elif array[i] == 'v':
            bucket[21] += 1
        elif array[i] == 'w':
            bucket[22] += 1
        elif array[i] == 'x':
            bucket[23] += 1
        elif array[i] == 'y':
            bucket[24] += 1
        elif array[i] == 'z':
            bucket[25] += 1
    return (bucket)

def main():
    S = input()
    bucket_list = counting_sort(S, 25)
    for i in range(26):
        if bucket_list[i] == 0:
            if i == 0:
                print('a')
                return
            if i == 1:
                print('b')
                return
            if i == 2:
                print('c')
                return
            if i == 3:
                print('d')
                return
            if i == 4:
                print('e')
                return
            if i == 5:
                print('f')
                return
            if i == 6:
                print('g')
                return
            if i == 7:
                print('h')
                return
            if i == 8:
                print('i')
                return
            if i == 9:
                print('j')
                return
            if i == 10:
                print('k')
                return
            if i == 11:
                print('l')
                return
            if i == 12:
                print('m')
                return
            if i == 13:
                print('n')
                return
            if i == 14:
                print('o')
                return
            if i == 15:
                print('p')
                return
            if i == 16:
                print('q')
                return
            if i == 17:
                print('r')
                return
            if i == 18:
                print('s')
                return
            if i == 19:
                print('t')
                return
            if i == 20:
                print('u')
                return
            if i == 21:
                print('v')
                return
            if i == 22:
                print('w')
                return
            if i == 23:
                print('x')
                return
            if i == 24:
                print('y')
                return
            if i == 25:
                print('z')
                return
    print('None')

main()

Submission status: Accepted

Solution code:
li=list("abcdefghijklmnopqrstuvwxyz")
inp=list(input())
used=[]
for c in inp:
  if c in used:
    continue
  li.remove(c)
  used.append(c)

if li==[]:
  print("None")
else:
  print(li[0])

Submission status: Accepted

Solution code:
S = input()
ans = "None"
W = {"a":0, "b":0, "c":0, "d":0,"e":0,"f":0,"g":0,"h":0,"i":0,"j":0,"k":0,"l":0,"m":0,"n":0,"o":0,"p":0,"q":0,"r":0,"s":0,"t":0,"u":0,"v":0,"w":0,"x":0,"y":0,"z":0}
P = "abcdefghijklmnopqrstuvwxyz"
for i in S:
  W[i] += 1
for p in P:
  if W[p] == 0:
    ans = p
    break
print(ans)

Submission status: Accepted

Solution code:
# Problem:
# Python 3rd Try

import sys
# from collections import defaultdict
# import heapq,copy
# from collections import deque
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]


def solver(inputString):
    full_set = set()
    input_set = set()
    for j in range(ord('a'), ord('z')+1, +1):
        full_set.add(chr(j))
    for j in range(0, len(inputString), +1):
        input_set.add(inputString[j])
    # print("FULLSET:{}".format(full_set))
    # print("INPUT:{}".format(input_set))
    # set -= other
    full_set -= input_set
    # print("NOTFOUND:{}".format(full_set))
    fullset_list = list(full_set)
    fullset_list.sort()
    # print("NOT in STRING:{}".format(fullset_list))
    if 0 == len(fullset_list):
        result = "None"
    else:
        result = fullset_list[0]
    return result


if __name__ == "__main__":
    S = sys.stdin.readline().split()
    print("{}".format(solver(S[0])))

Submission status: Accepted

Solution code:
s = str(input())
s = sorted(set(s))
ch = "abcdefghijklnopqrstuvwxyz"
for i in ch:
    if i not in s:
        print(i)
        break
else:
    print("None")

Submission status: Accepted

Solution code:
s=input()
s=sorted(set(s))
w="abcdefghijklmnopqrstuvwxyz"
for i in w:
    if i not in s:
        print(i)
        break
else:
    print("None")

Submission status: Accepted

Solution code:
s=input()
al="abcdefghijklmnopqrstuvwxyz"
ans="None"
for i in al:
  dumy=s.count(i)
  if dumy==0:
    ans=i
    break

print(ans)

Submission status: Accepted

Solution code:
s = input()
l = [chr(i) for i in range(97, 97+26)]

for j in range(26):
  if l[j] in s:
    j += 1
  else:
    print(l[j])
    exit()
print('None')

Submission status: Accepted

Solution code:
def solve():
    S = set(input())
    alph = set("qwertyuiopasdfghjklzxcvbnm")
    nonS = sorted(alph-S)
    if len(nonS) == 0:
        print("None")
    else:
        print(nonS[0])


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
s = input()
c = set()
for i in range(len(s)):
  c.add(s[i])
c = list(c)
c.sort()
abc = ['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']
ans = ''
for e in abc:
  if e not in c:
    ans = e
    break
if ans == '':
  ans = 'None'
print(ans)

Submission status: Accepted

Solution code:
s = input()

l = [chr(i) for i in range(97, 97 + 26)]
flag = True
for i in l:
    if not i in s:
        print(i)
        flag = False
        break
if flag:
    print('None')

Submission status: Accepted

Solution code:
s = input()

l = ['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']
flag = True
for i in l:
    if not i in s:
        print(i)
        flag = False
        break
if flag:
    print('None')

Submission status: Accepted

Solution code:
S = list(input())
alphabet = ['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']
# print(alphabet)
# print(S)
print('None') if len(set(S)) == 26 else print(sorted(list(set(alphabet) - set(S)))[0])

Submission status: Accepted

Solution code:
s=input()
alphabet=[chr(i) for i in range(97,97+26)]
for i in alphabet:
    if s.count(i)<1:
        print(i)
        exit()
print("None")

Submission status: Accepted

Solution code:
import string

s = set(input())
x = set(string.ascii_lowercase)

print('None' if x == s else sorted(x - s)[0])

Submission status: Accepted

Solution code:
S = input()

alpha = [chr(i) for i in range(97, 97+26)]

remain = list(set(alpha) - set(S))

if remain == []:
    print("None")
else:
    remain.sort()
    print(remain[0])

Submission status: Accepted

Solution code:
s=input()
sset=set(s)
list1=list(range(97,123))
for i in range(len(sset)):
    str1=sset.pop()
    list1.remove(ord(str1))
if len(list1)==0:
    print("None")
else:
    print(chr(list1[0]))

Submission status: Accepted

Solution code:
S = set(input())
ans = 'None'
for x in 'abcdefghijklmnopqrstuvwxyz':
    if x not in S:
        ans = x
        break
print(ans)

Submission status: Accepted

Solution code:
S = input()
alpha = "abcdefghijklmnopqrstuvwxyz"
D = {alpha[i]: [i, 0] for i in range(len(alpha))}
for i in S:
  D[i][1] += 1
L = [D[i] for i in D]
L.sort()
if min(L[i][1] for i in range(len(alpha))) >= 1:
  print("None")
else:
  for i in range(len(alpha)):
    if L[i][1] == 0:
      break
  print(alpha[i])

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys
# import time
# import math
# import numpy as np
# import scipy.sparse.csgraph as cs            # csgraph_from_dense(ndarray, null_value=inf), bellman_ford(G, return_predecessors=True), dijkstra, floyd_warshall
# import random                                # random, uniform, randint, randrange, shuffle, sample
import string                                # ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from datetime import date, datetime          # date.today(), date(year,month,day) => date obj; datetime.now(), datetime(year,month,day,hour,second,microsecond) => datetime obj; subtraction => timedelta obj
# from datetime.datetime import strptime       # strptime('2019/01/01 10:05:20', '%Y/%m/%d/ %H:%M:%S') returns datetime obj
# from datetime import timedelta               # td.days, td.seconds, td.microseconds, td.total_seconds(). abs function is also available.
# from copy import copy, deepcopy              # use deepcopy to copy multi-dimentional matrix without reference
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from fractions import gcd                    # for Python 3.4 (previous contest @AtCoder)



def main():
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79...e+308
    # inf = 2 ** 64 - 1             # (for fast JIT compile in PyPy) 1.84...e+19
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    s = input()
    for alpha in string.ascii_lowercase:
        if alpha in s:
            continue
        else:
            print(alpha)
            exit()
    print('None')


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s = input()
alphabet = "abcdefghijklmnopqrstuvwxyz"
for alp in alphabet:
    if alp not in s:
        print(alp)
        exit()
else:
    print('None')

Submission status: Accepted

Solution code:
from string import ascii_lowercase

S = input()
D = dict()

for s in S:
    D[s] = True

for s in ascii_lowercase:
    if not s in D:
        print(s)
        exit()
print('None')

Submission status: Accepted

Solution code:

if __name__ == '__main__':
    a = input()
    count = 0

    for i in range(26):
        s = chr(97+i)
        if s in a:
            count+=1
        else:
            print(s)
            break

    if count == 26:
        print("None")

Submission status: Accepted

Solution code:
s = list(input())
s2 = []
for i in range(len(s)):
    s2.append(s[i])
s3 = list(set(s2))
s3.sort()
s4 = ['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 s3 == s4:
    print('None')
else:
    for i in range(int(len(s3))):
        if s3[i] != s4[i]:
            print(s4[i])
            break
        if i == len(s3)-1:
            print(s4[i+1])

Submission status: Accepted

Solution code:
al = [chr(i) for i in range(97, 97+26)]
print(min(set(al) - set(input()) or ['None']))

Submission status: Accepted

Solution code:
S = input()
S = sorted(set(S))
alf =sorted(set("abcdefghijklmnopqrstuvwxyz"))
ans = ""

if len(S) == 26:
    print("None")
else:
    for i in range(len(alf)):
        if alf[i] not in S:
            ans += alf[i]
    ans = sorted(ans)  
    print(ans[0])

Submission status: Accepted

Solution code:
S=sorted(set(list(str(input()))))
alf='abcdefghijklmnopqrstuvwxyz'
if len(S)==26:
  print('None')
else:
  for i in range(26):
    if alf[i] not in S:
      print(alf[i])
      break

Submission status: Accepted

Solution code:
A = ['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']
S = list(input())
for s in S:
    if s in A:
        A.remove(s)
if A:
    print(A[0])
else:
    print('None')

Submission status: Accepted

Solution code:
s = input()
alpha = 'abcdefghijklmnopqrstuvwxyz'
 
for i in list(alpha):
  if i not in s:
    print(i)
    exit()
    
print('None')

Submission status: Accepted

Solution code:
s = set(input())
a_z = set('abcdefghijklmnopqrstuvwxyz')
comp_s = sorted(list(a_z - s))
print(comp_s[0] if len(comp_s) else 'None')

Submission status: Accepted

Solution code:
S=input()
T="abcdefghijklmnopqrstuvwxyz"
for t in T:
    if t not in S:
        print(t)
        exit()
print("None")

Submission status: Accepted

Solution code:
import sys

S = str(input())
tmp = []

for i in range(0,len(S)):
  tmp.append(ord(S[i]))

for i in range(97,123):
  if (i in tmp):
    print("", end="")
  else:
    print (chr(i))
    sys.exit()
print("None")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(S: str):
    alp = sorted(set(S))
    for abc in [chr(i) for i in range(97, 97 + 26)]:
        if not abc in alp:
            print(abc)
            break
    else:
        print("None")
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    solve(S)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
S = set(input())
rest = set("abcdefghijklmnopqrstuvwxyz") - S
if len(rest) == 0:
    print("None")
else:
    print(sorted(rest)[0])

Submission status: Accepted

Solution code:
#import numpy as np
#from itertools import combinations as comb
#from itertools import combinations_with_replacement as comb_with

#A = int(input())
#A,B= map(int,input().split())
#A = list(map(int,input().split()))
#B = list(map(int,input().split()))
S= str(input())

dict = list('abcdefghijklmnopqrstuvwxyz')
for i in range(len(S)):
    for s in dict:
        if s==S[i]:
            dict.remove(s)

            continue
if dict:
    print(dict[0])

else:
    print('None')

Submission status: Accepted

Solution code:
import string

word = input()
word = set(word)

chars = set(string.ascii_lowercase)
diff = chars - word
sorted_diff = sorted(diff)
if sorted_diff:
    print(sorted_diff[0])
else:
    print('None')

Submission status: Accepted

Solution code:
s = sorted({chr(q) for q in range(97, 123)} - set(input()))
print(s[0] if s else "None")

Submission status: Accepted

Solution code:
def main():
    s = list(input())
    s_d = list(set(s))
    a = [chr(i) for i in range(ord('a'), ord('z')+1)]
    set_diff = sorted(list(set(s_d) ^ set(a)))
    if len(set_diff) > 0:
        print(set_diff[0])
    else:
        print('None')
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# Problem: https://atcoder.jp/contests/abc071/tasks/abc071_b
# Python 2nd Try

import sys
# from collections import defaultdict
# import heapq,copy
# from collections import deque
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def solver(inputStr):
    # print("STR={}".format(inputStr))
    # バケツを用意する
    bucket = [0] * 26
    result = "None"
    # print("Bucket:{}".format(bucket))
    for j in range(0, len(inputStr), +1):
        charNo = ord(inputStr[j]) - ord('a')
        bucket[charNo] = bucket[charNo] + 1
    for j in range(0, 26, +1):
        if bucket[j] == 0:
            result = chr(ord('a')+j)
            break
    # algorithm
    return result
if __name__ == "__main__":
    S = sys.stdin.readline().split()
    print("{}".format(solver(S[0])))

Submission status: Accepted

Solution code:
s = input()
for i in range(97,97+26):
    if chr(i) not in s:
        print(chr(i));exit()
print('None')

Submission status: Accepted

Solution code:
S = input()
#A = {"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"}
A = ["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"]

for i in set(S):
	A.remove(i)
	#print(A)
if len(A) == 0:
	print("None")
else:
	print(A[0])

Submission status: Accepted

Solution code:
S = input()
alfa = list('abcdefghijklmnopqrstuvwxyz')

for i in range(len(alfa)):
    if alfa[i] not in S:
        print(alfa[i])
        exit()

print('None')

Submission status: Accepted

Solution code:
import string
S = input()
v = set()
for c in S:
    v.add(c)

for c in string.ascii_lowercase:
    if not c in v:
        print(c)
        break
else:
    print("None")

Submission status: Accepted

Solution code:
s = input()
sl = list(s)    
sls = set(sl)

import collections

c = collections.Counter(sls)
temp = "abcdefghijklmnopqrstuvwxyz"

for i in temp:
    if c[i]==0:
        print(i)
        exit()
print("None")

Submission status: Accepted

Solution code:
s = list(set(input()))
alf = 'a'
for i in range(26):
    if alf not in s:
        print(alf)
        exit()
    else:
        alf = chr(ord(alf)+1)
print('None')

Submission status: Accepted

Solution code:
alfa = 'abcdefghijklmnopqrstuvwxyz'
S = input()
for i in range(len(alfa)):
    if alfa[i] not in S:
        print(alfa[i])
        break
else:
    print('None')

Submission status: Accepted

Solution code:
import string
def ABC_71_B():
    s=list(input())
    li_all = [x for x in string.ascii_letters]

    if len(set(s))>=26:
        print('None')
    else:
        s.sort()
        for i in range(len(s)):
            if s.count(li_all[i])==0:
                print(li_all[i])
                break
    
if __name__ == '__main__':

    ABC_71_B()

Submission status: Accepted

Solution code:
s=list(input())
flag=0
s=sorted(set(s))
list1='abcdefghijklmnopqrstuvwxyz'
for i in range(26):
    if list1[i] not in s:
        flag=1
        print(list1[i])
        break
if flag==0:
    print('None')

Submission status: Accepted

Solution code:
s=list(input())
s=set(s)
import string
l=string.ascii_lowercase
ans="None"
for a in l:
  if a not in s:
    ans=a
    break
print(ans)

Submission status: Accepted

Solution code:
S = set(input())
if len(S)==26:
    print('None')
else:
    A = 'abcdefghijklmnopqrstuvwxyz'
    for i in range(26):
        if A[i] not in S:
            print(A[i])
            break

Submission status: Accepted

Solution code:
s = set(input())
al = 'abcdefghijklmnopqrstuvwxyz'
ans = 'None'
for i in al:
    if i not in s:
        ans = i
        break
print(ans)

Submission status: Accepted

Solution code:
s = input()
alpha = "abcdefghijklmnopqrstuvwxyz"
for i in alpha:
    if not i in s:
        print(i)
        break
    elif i == "z":
        print("None")

Submission status: Accepted

Solution code:
S = input()
dict = {}
for s in S:
    dict[s] = 1

keys = list(dict.keys())
for i in range(ord('a'), ord('z')+1):
    if chr(i) in keys:
        continue
    else:
        print(chr(i))
        exit()
print(None)

Submission status: Accepted

Solution code:
import collections

def main():
    S = list(input())
    CS = collections.Counter(S)
    letter = ['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']
    for l in letter:
        if l not in CS:
            print(l)
            return
    print('None')

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def solve():
    ans = 0
    S = input()
    lis = [0]*26
    for s in S:
        lis[ord(s)-ord('a')] += 1
    for i,l in enumerate(lis):
        if l==0:
            ans = chr(ord('a')+i)
            return ans
    return 'None'
print(solve())

Submission status: Accepted

Solution code:
Ss=set(input())
S=sorted(Ss)
if len(S)==26:
    print('None')
    exit()
else:
    for i in range(26):
        if not chr(i+97) in S:
            print(chr(i+97))
            exit()

Submission status: Accepted

Solution code:
s = input()
if len(set(s)) == 26:
	print("None")
	exit()
for i in range(ord('a'), ord('z') + 1):
	if chr(i) not in s:
		print(chr(i))
		exit()

Submission status: Accepted

Solution code:
import sys
#import numpy as np
import math
#from fractions import Fraction
#import itertools
from collections import deque
#import heapq
from fractions  import gcd

#input=sys.stdin.readline
s=input()
n=len(s)
al=[chr(ord('a') + i) for i in range(26)]
ind=[0]*26
for i in range(n):
    j=ord(s[i])-ord("a")
    ind[j]-=1
for i in range(26):
    if ind[i]==0:
        print(al[i])
        break
else:
    print("None")

Submission status: Accepted

Solution code:
S = input()
N = len(S)

alpha = "abcdefghijklmnopqrstuvwxyz"

for i in range(N):
    alpha = alpha.replace(S[i], "")

ans = sorted(alpha)

if ans == []:
    print("None")
else :
    print(ans[0])

Submission status: Accepted

Solution code:
S = input()
ans = None
for c in 'abcdefghijklmnopqrstuvwxyz':
    if c not in S:
        ans = c
        break
print(ans)

Submission status: Accepted

Solution code:
from string import ascii_lowercase


S = input()
ans = None
for c in ascii_lowercase:
    if c not in S:
        ans = c
        break
print(ans)