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:
a = "abcdefghijklmnopqrstuvwxyz"
a = list(a)
s = set(input())
c = 0
for i in a:
    if not i in s:
        c = 1
        print(i)
        break
if c == 0:
    print("None")

Submission status: Accepted

Solution code:
s=list(input())
l=[chr(i) for i in range(ord('a'),ord('z')+1) if chr(i) not in s]
print(sorted(l)[0] if len(l)>0 else 'None')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
from collections import Counter
INF = float("inf")


def solve(S: str):
    counter = Counter(S)
    for i in range(ord("a"), ord("z")+1):
        if counter[chr(i)] == 0:
            break
    else:
        print("None")
        return
    print(chr(i))

    return


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 = input()
a = 'abcdefghijklmnopqrstuvwxyz'
ans = 'None'
for c in a:
  if s.find(c) < 0:
    ans = c
    break
print(ans)

Submission status: Accepted

Solution code:
S = input()

D = 'abcdefghijklmnopqrstuvwxyz'
temp = D

for i in S:
    res = ''
    for j in temp:
        if i != j:
            res += j
    temp = res

if res == '':
    print('None')
else:
    print(res[0])

Submission status: Accepted

Solution code:
s = input()
l_alph = ["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 = [0]*26
for i in range(26):
	if l_alph[i] in s:
		ans[i] = 1
for i in range(26):
	if not ans[i]:
		print(l_alph[i])
		quit()
print("None")

#l_alph = [i for i in range(26)]

Submission status: Accepted

Solution code:
s = input()

sLst = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n',\
        'o','p','q','l','s','t','u','v','w','x', 'y', 'z']
ansLst = []

for i in sLst:
    if s.count(i) == 0:
        ansLst.append(i)

if len(ansLst) == 0:
    print('None')
else:
    ansLst.sort()
    print(ansLst[0])

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    S = input()

    complement_S = list(set([chr(i) for i in range(ord('a'), ord('z')+1)]) - set(list(S)))

    if len(complement_S) == 0:
        print("None")
    else:
        print(min(complement_S))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
str = "abcdefghijklmnopqrstuvwxyz"
l1 = list(str)
l2 = list(S)
l3 = list(set(l1)-set(l2))
l3.sort()
if len(l3)==0:
    print("None")
else:
    print(l3[0])

Submission status: Accepted

Solution code:
s = input()
s = [ord(ss) for ss in s]
flag = []
for i in range(ord('a'), ord('z')+1):
  if i in s:
    flag.append(i)
if len(set(flag)) == 26:
  print('None')
else:
  for i in range(ord('a'), ord('z')+1):
    if i not in flag:
      print(chr(i))
      break

Submission status: Accepted

Solution code:
import string
S = input()
S = sorted(S)
ans = 'None'
char = [chr(i) for i in range(97, 97+26)]
for i in char:
    if i not in S:
        ans = i
        break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

num=[0]*26

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

if ans == 0:
    print("None")
else:
    ans1 = num.index(0)
    if ans1 == 0:
        print("a")
    elif ans1 == 1:
        print("b")
    elif ans1 == 2:
        print("c")
    elif ans1 == 3:
        print("d")
    elif ans1 == 4:
        print("e")
    elif ans1 == 5:
        print("f")
    elif ans1 == 6:
        print("g")
    elif ans1 == 7:
        print("h")
    elif ans1 == 8:
        print("i")
    elif ans1 == 9:
        print("j")
    elif ans1 == 10:
        print("k")
    elif ans1 == 11:
        print("l")
    elif ans1 == 12:
        print("m")
    elif ans1 == 13:
        print("n")
    elif ans1 == 14:
        print("o")
    elif ans1 == 15:
        print("p")
    elif ans1 == 16:
        print("q")
    elif ans1 == 17:
        print("r")
    elif ans1 == 18:
        print("s")
    elif ans1 == 19:
        print("t")
    elif ans1 == 20:
        print("u")
    elif ans1 == 21:
        print("v")
    elif ans1 == 22:
        print("w")
    elif ans1 == 23:
        print("x")
    elif ans1 == 24:
        print("y")
    elif ans1 == 25:
        print("z")

Submission status: Accepted

Solution code:
S = input()
alphabet = 'abcdefghijklmnopqrstuvwxyz'
for idx in range(26):
  if not alphabet[idx] in S:
    print(alphabet[idx])
    exit()
print('None')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math
import itertools
 
# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev
 
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    S = list(input())
    
    tmp = [chr(i) for i in range(97, 97+26)]
    
    for i in tmp:
        if i in S:
            continue
        else:
            print(i)
            sys.exit()
            
    print("None")
    
    
if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
import string
li = string.ascii_lowercase
s = sorted(list(input()))
for i in range(26):
    if not li[i] in s:
        print(li[i])
        exit()
print("None")

Submission status: Accepted

Solution code:
s = input()
packet = 'abcdefghijklmnopqrstuvwxyz'
checked = [0]*26
ans = []
for i in range(len(s)):
    checked[packet.index(s[i])] = 1
for i in range(26):
    if checked[i] != 1:
        ans.append(packet[i])
ans.sort()
if sum(checked) != 26:
    print(ans[0])
else:
    print('None')

Submission status: Accepted

Solution code:
A2Z = set(map(chr, range(ord('a'), ord('z')+1)))
s = set(input())
if A2Z == s:
  print('None')
else:
  print(sorted(A2Z - s)[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l=set(i for i in "abcdefghijklmnopqrstuvwxyz")
n=set(j for j in input())
b=sorted(l-n)
print("None" if b==[] else b[0])

Submission status: Accepted

Solution code:
S = input()

word_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']

for i in word_list:
    if i not in set(S):
        print(i)
        exit()

print('None')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s1 = sorted(input())
s2 = "abcdefghijklmnopqrstuvwxyz"

for s in s2:
  if s in s1:
    pass
  else:
    print(s)
    break
else:
  print("None")

Submission status: Accepted

Solution code:
alf = ["a","b","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(str(input()))
flag = 0
for i in alf:
    if i not in s:
        print(i)
        flag = 1
        break
if flag == 0:
    print("None")

Submission status: Accepted

Solution code:
s=set(input())
alphabet="abcdefghijklmnopqrstuvwxyz"
alp=set(alphabet)
print(min(alp - s) if len(alp-s)!=0 else "None")

Submission status: Accepted

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

tmp = S[0]
if tmp != 'a':
    print('a')
    exit()

for i in S:
    if ord(i) == (ord(tmp) + 1) or ord(i) == ord(tmp):
        tmp = i
    else:
        print(chr(ord(i)-1))
        exit()

if tmp == 'z':
    print("None")
else:
    print(chr(ord(i)+1))

Submission status: Accepted

Solution code:
# ABC 71, B - Not found
from collections import Counter
import string

s = input()
c = Counter(s)

for x in string.ascii_lowercase:
    if c[x] == 0:
        print(x)
        break
else:
    print('None')

Submission status: Accepted

Solution code:
s = list(input())
alpha = 'abcdefghijklmnopqrstuvwxyz'
alpha_list = list(alpha)
check = [0] * 26
for i in range(len(s)):
  if check[alpha_list.index(s[i])] == 0 :
    check[alpha_list.index(s[i])] = 1
if 0 in check :
  ans = alpha_list[check.index(0)]
  print(ans)
else:
  print('None')

Submission status: Accepted

Solution code:
S = set(input())
Alph={chr(i) for i in range(97, 97+26)}
B = Alph - S
if B==set():
  print('None')
else:
  print(sorted(B)[0])

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'}
ans = sorted(list(alphabet - set(s)))
if len(ans) == 0:
    ans = 'None'
else:
    ans = ans[0]
print(ans)

Submission status: Accepted

Solution code:
S = list(input())
s = set(S)
S = list(s)
S.sort()
if len(S) == 26:
    print (None)
else:
    tmp = 0
    for i in 'abcdefghijklmnopqrstuvwxyz':
        if tmp >= len(S):
            print (i)
            break
        if i == S[tmp]:
            tmp += 1
        else:
            print (i)
            break

Submission status: Accepted

Solution code:
s = input()
alpha = 'abcdefghijklmnopqrstuvwxyz'
for i in range(len(alpha)):
  if alpha[i] not in s:
    print(alpha[i])
    exit()
print('None')

Submission status: Accepted

Solution code:
from collections import defaultdict
S = input()
alphabet = list("abcdefghijklmnopqrstuvwxyz")
d = defaultdict(int)

for s in S:
     d[s] += 1
for s in alphabet:
     if d[s] == 0:
          ans = s
          break
else:
     ans = "None"
print(ans)

Submission status: Accepted

Solution code:
s = input()
letters = "abcdefghijklmnopqrstuvwxyz"
hash = {}

for chara in s:
  hash[chara] = 1
  if(len(hash) == 26):
    print("None")
    exit()

for c in letters:
  if c not in hash:
    print(c)
    exit()

Submission status: Accepted

Solution code:
a = list(input())
b = list("abcdefghijklmnopqrstuvwxyz")
for i in range(len(b)):
    c = True
    for j in range(len(a)):
        if b[i] == a[j]:
            c = False
    if c:
        print(b[i])
        exit()
print("None")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
s = list(input())
abc = list('abcdefghijklmnopqrstuvwxyz')
for i in abc:
  if i not in s :
    print(i)
    sys.exit()
print('None')

Submission status: Accepted

Solution code:
s = input()
alphabet = [0 for i in range(26)]
for i in s:
    alphabet[ord(i)-97] += 1
for i in range(len(alphabet)):
    if alphabet[i] == 0:
        print(chr(i+97))
        break
    elif i == len(alphabet) - 1:
        print("None")

Submission status: Accepted

Solution code:
s = list(sorted(set(input())))
dic = list("abcdefghijklmnopqrstuvwxyz")
for i in s:
        dic.remove(i)
if not dic:
        print("None")
else:
        print(min(dic))

Submission status: Accepted

Solution code:
s=set(input())
alp={"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 len(s) ==26:
  print("None")
else:
  print(sorted(alp-s)[0])

Submission status: Accepted

Solution code:
import string

def B():
    s = set(input())
    for c in string.ascii_lowercase:
        if c not in s:
            print(c)
            break
    else:
        print("None")

B()

Submission status: Accepted

Solution code:
import re
a = input()
a = [a[i] for i in range(len(a))]
b = "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"
b = list(b.split())
a.sort()
b.sort()
for j in range(len(b)):
    c = True
    for i in range(len(a)):
        if a[i] == b[j]:
            c = not c
            break
    if c:
        print(b[j])
        exit()
print("None")

Submission status: Accepted

Solution code:
alpha = "abcdefghijklmnopqrstuvwxyz"

s = input()

for a in alpha:
    if a not in s:
        print(a)
        exit()

print("None")

Submission status: Accepted

Solution code:
s = input()
alpha = 'abcdefghijklmnopqrstuvwxyz'

s_set = set(s)
if len(s_set) == 26:
    print('None')
else:
    for a in alpha:
        if a not in s_set:
            print(a)
            break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = set(input())
s1 = set("abcdefghijklmnopqrstuvwxyz")
ans = sorted(list(s1 - s))
if ans:
    print(ans[0])
else:
    print("None")

Submission status: Accepted

Solution code:
s=set(list(str(input())))
l=[chr(i) for i in range(97, 97+26)]
for i in l:
    if i not in s:
        print(i)
        exit()
print("None")

Submission status: Accepted

Solution code:
# ABC072-B
S = input()
ss = set()
for i in range(len(S)):
    ss.add(S[i])

alpha_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']
ans = ''
for k in range(len(alpha_list)):
    if alpha_list[k] not in ss:
        ans = alpha_list[k]
        break
if len(ss) == 26:
    print('None')
else:
    print(ans)

Submission status: Accepted

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

alpha = 'abcdefghijklmnopqrstuvwxyz'
s = list(input())
for i in range(26):
    if alpha[i] not in s:
        print(alpha[i])
        quit()
print('None')

Submission status: Accepted

Solution code:
s = list(input())
alphabets = list('abcdefghijklmnopqrstuvwxyz')
for i in range(len(s)):
  if s[i] in alphabets:
    alphabets.pop(alphabets.index(s[i]))
if len(alphabets) > 0:
  print(alphabets[0])
else:
  print("None")

Submission status: Accepted

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


def read_h(typ=int):
    return list(map(typ, input().split()))


def read_v(n, typ=int):
    return [typ(input()) for _ in range(n)]


def main():
    S = input()

    for i in range(26):
        c = chr(ord('a') + i)
        if c not in S:
            print(c)
            return

    print(None)


if __name__ == '__main__':
    main()

Submission status: Accepted

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


def read_h(typ=int):
    return list(map(typ, input().split()))


def read_v(n, typ=int):
    return [typ(input()) for _ in range(n)]


def main():
    S, = read_h(str)
    flag = [False] * 26
    for c in S:
        i = ord(c) - ord('a')
        if not flag[i]:
            flag[i] = True

    ans = None
    for i, f in enumerate(flag):
        if not f:
            print(chr(i + ord('a')))
            return

    print(str(ans))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
s=set(s)
l = list(s)
l.sort()
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(l)):
    if(l[i]!=al[i]):
        print(al[i])
        break
lenl=len(l)
lenl1=lenl-1
if((lenl<=25)&(l[lenl1]==al[lenl1])):
    print(al[len(l)])
if (l==al):
    print('None')

Submission status: Accepted

Solution code:
S = input()

S = list(set(S))
S.sort()

T = [0 for _ in range(26)]

for s in S:
    T[ord(s)-97] = 1

for n in range(26):
    if T[n] == 0:
        print(chr(n+97))
        break
else:
    print('None')

Submission status: Accepted

Solution code:
a = 'abcdefghijklmnopqrstuvwxyz'
s = input()

for i in a:
    if i not in s:
        print(i)
        break
else:
    print('None')

Submission status: Accepted

Solution code:
alphabet_set={"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=input()
s_set=set(s)
ans_set=alphabet_set-s_set
ans_l=list(ans_set)
ans_l.sort()

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

Submission status: Accepted

Solution code:

S = input()
dic = {}

dic[" "] = 1

for i in S:
    dic[i] = 1

cha = "abcdefghijklmnopqrstuvwxyz "

for i in cha:

    if i not in dic:
        print(i)
        break

    if i == " ":
        print("None")
        break

Submission status: Accepted

Solution code:
S = input()
alphabet = "abcdefghijklmnopqrstuvwxyz"
chk_list = []
for a in alphabet:
    chk_list.append(a)

for s in S:
    if s in chk_list:
        chk_list.remove(s)

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

Submission status: Accepted

Solution code:
a = input()
b = sorted(a)
c = "abcdefghijklmnopqrstuvwxyz"

for s in c:
  if s in b:
    pass
  else:
    print(s)
    break
else:
  print("None")

Submission status: Accepted

Solution code:
S = input()
A = [chr(ord('a') + i) for i in range(26)]
c = 0

for i in range(26):
  if A[i] in S:
    continue
  else:
    print(A[i])
    c = 1
    break
if c == 0:
  print("None")

Submission status: Accepted

Solution code:
s = input().split()
s = list(s[0])
s.sort()
alf = [chr(i) for i in range(97, 97+26)]
Flag = 0
s_not_duplicate = []
s_not_duplicate.append(s[0])
for i in range(len(s)):
    if s_not_duplicate[-1] != s[i]:
        s_not_duplicate.append(s[i])

for i in range(len(alf)):
    if i > len(s_not_duplicate) - 1:
        print(alf[i])
        Flag = 1
        break
    
    if s_not_duplicate[i] != alf[i]:
        Flag = 1
        print(alf[i])
        break
if Flag == 0:
    print("None")

Submission status: Accepted

Solution code:
alpha = [chr(ord('a') + i) for i in range(26)]

s = input()
lst = list(s)
lst.sort()

for w in alpha:
    if w not in lst:
        print(w)
        exit()
print('None')

Submission status: Accepted

Solution code:
s=list(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"]
d=list(set(s))
d.sort()
ans="None"
for i in range(min(len(a),len(d))):
    if d[i]!=a[i]:
        ans=a[i]
        break
    u=i
if len(d)<len(a) and ans=="None":
    ans=a[u+1]
print(ans)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

def num2alpha(num):
    if num <= 26:
        return chr(64 + num)
    elif num % 26 == 0:
        return num2alpha(num // 26 - 1) + chr(90)
    else:
        return num2alpha(num // 26) + chr(64 + num % 26)

s = list(input().upper())
for i in range(1, 27):
    if num2alpha(i) in s:
        continue
    else:
        print(num2alpha(i).lower())
        break
else:
    print("None")

Submission status: Accepted

Solution code:
s = set(list(map(str, input())))
alph = [chr(i) for i in range(97, 97+26)]
for c in alph:
    if c not in s:
        print(c)
        exit()
print("None")

Submission status: Accepted

Solution code:
S=input()
T=[]
result='None'
for i in range(len(S)):
  T.append(S[i])
T=list(set(T))
T.sort()
A='abcdefghijklmnopqrstuvwxyz'
for j in range(len(T)):
  if T[j]!=A[j]:
    result=A[j]
    break
  if j == (len(T)-1) and len(T) != len(A):
    result=A[j+1]
print(result)

Submission status: Accepted

Solution code:
s=input()
for i in "abcdefghijklmopqrstuvwxyz":
  if i in s:continue
  print(i)
  break
else:
  print("None")

Submission status: Accepted

Solution code:
import string
s = input()
find = False
for c in string.ascii_lowercase:
  if c not in s:
    print(c)
    find = True
    break
if not find:
  print('None')

Submission status: Accepted

Solution code:
x=input()
for i in range(26):
    num=x.count(chr(i+97))
    if num==0:
        print(chr(i+97))
        num+=1
        break
    num=0
if num==0:
    print("None")

Submission status: Accepted

Solution code:
s = input()
s_set = list(set(s))    #重複削除

s_set.sort()

chk = list("abcdefghijklmnopqrstuvwxyz")

i = 0

while 1:
    if s_set[i] != chk[i]:
        print(chk[i])
        break
    i += 1
    
    if i >= (len(s_set)):
        print(chk[i])
        break
    if i >= 25:
        print("None")
        break

Submission status: Accepted

Solution code:
def main():
    L = [0] * 26
    for s in input():
        L[ord(s) - 97] = 1
    for i, j in enumerate(L):
        if j == 0:
            print(chr(97 + i))
            return
    print('None')


main()

Submission status: Accepted

Solution code:
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

S = s()

left = set(list('abcdefghijklmnopqrstuvwxyz'))
for c in S:
    if c in left:
        left.remove(c)

if len(left) > 0:
    print(sorted(list(left))[0])
else:
    print('None')

Submission status: Accepted

Solution code:
S = set(input())
diff = set('abcdefghijklmnopqrstuvwxyz') - S
if diff:
    print(min(diff))
else:
    print('None')

Submission status: Accepted

Solution code:
check = "abcdefghijklmnopqrstuvwxyz"
check_list = list(check)

s = list(input())
s = list(dict.fromkeys(s))
s.sort(reverse=False)

for search in check_list :
    if search not in s :
        print(search)
        exit()
        
print("None")

Submission status: Accepted

Solution code:
s=input()
ans=False

al=list("abcdefghijklmnopqrstuvwxyz")
for i in al:
        if not i in s:
            ans=True
            print(i)
            break
if not ans:
    print("None")

Submission status: Accepted

Solution code:
s=input()
al='abcdefghijklmnopqrstuvwxyz'
for a in al:
    if not a in s:
        print(a)
        break
else:
    print('None')

Submission status: Accepted

Solution code:
s=input()
al='abcdefghijklmnopqrstuvwxyz'
for a in al:
    if not a in s:
        print(a)
        exit()
print('None')

Submission status: Accepted

Solution code:
s=input()
al=[chr(ord('a') + i) for i in range(26)]
sl=set([s[i] for i in range(len(s))])
for si in sl:
    al.remove(si)
if len(al)>0:
    print(al[0])
else:
    print('None')

Submission status: Accepted

Solution code:
s=input()

al=list("abcdefghijklmnopqrstuvwxyz")
#print(al)

ans=False

for i in al:
    if not i in s:
        print(i)
        ans=True
        break

if not ans:
    print(None)

Submission status: Accepted

Solution code:
def abc():
    import string
    nf = set(string.ascii_lowercase) - set(input().rstrip())
    if len(nf):
        print(sorted(nf)[0])
    else:
        print('None')


abc()

Submission status: Accepted

Solution code:
S=input()
for i in range(26):
    s=chr(ord("a")+i)
    if s in S:
        continue
    print(s)
    quit()
print("None")

Submission status: Accepted

Solution code:
s = input()
ok = False
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 al:
    if i not in s:
        print(i)
        ok = True
        break
if not ok:
    print('None')

Submission status: Accepted

Solution code:
from sys import stdin
S = (stdin.readline().rstrip())
if len(set(list(S))) == 26:
    print("None")
else:
    s = set(list("abcdefghijklmnopqrstuvwxyz")) - (set(list(S)))
    print(sorted(s)[0])

Submission status: Accepted

Solution code:
s = input()
temp = 'abcdefghijklmnopqrstuvwxyz'
for i in range(26):
    if s.find(temp[i]) == -1:
        print(temp[i])
        exit()
print('None')

Submission status: Accepted

Solution code:
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys
import string

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")

# S = sys.stdin.readline().rstrip()
# print(S[::2])

S = sys.stdin.readline().rstrip()
for c in string.ascii_lowercase:
    if c not in S:
        print(c)
        exit()
print('None')

Submission status: Accepted

Solution code:

from collections import Counter

def main():
    data = input()
    for i in range(26):
        now_str = chr(i + 97)
        if now_str not in data:
            print(now_str)
            break
    else:
        print('None')



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import string
string.ascii_lowercase
a = list(string.ascii_lowercase)
s = input()
s = [i for i in s]
s.sort()
for c in a:
    if s.count(c) == 0:
        print(c)
        exit()
print('None')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(str(input()))
e = list('abcdefghijklmnopqrstuvwxyz')
sSet = set(s)
for i in sSet :
        e.remove(i)
if e == [] :
        print('None')
else :
        print(min(e))

Submission status: Accepted

Solution code:
S = sorted(set(input()))
s = [chr(i) for i in range(97,97+26)]
for i in s:
    if i not in S:
        print(i)
        break
    elif i == 'z':
        print('None')

Submission status: Accepted

Solution code:
s=input()
for i in range(26):
  if chr(97+i) not in s:
    print(chr(97+i))
    break
  if i==25 and "z" in s:
    print("None")

Submission status: Accepted

Solution code:
alpha = [chr(ord('a') + i) for i in range(26)]
s = [str(i) for i in input()]

ss = set(alpha) - set(s)
ans = list(ss)
ans = sorted(ans)
if ans == []:
    print("None")
else:
    print(ans[0])

Submission status: Accepted

Solution code:
alphabets = set(chr(ord('a')+i) for i in range(26))
alphabets -= set(input())

rest = sorted(alphabets)
answer = rest[0] if rest else 'None'

print(answer)

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"]
ans = "None"
for a in A:
    if a not in S:
        ans = a
        break
print(ans)

Submission status: Accepted

Solution code:
s = set(list(input()))
flag = True
for i in range(ord('a'), ord('z')+1):
    if chr(i) not in s:
        print(chr(i))
        flag = False
        break
if flag:
    print('None')

Submission status: Accepted

Solution code:
S = set(input())
word = set('abcdefghijklmnopqrstuvwxyz')
word = word - S
word = sorted(word)

if word == []:
    print('None')
else:
    print(word[0])

Submission status: Accepted

Solution code:
s=input()
a='abcdefghijklmnopqrstuvwxyz'
x='None'
for i in range(26):
  if a[i] not in s:
    x=a[i]
    break
print(x)

Submission status: Accepted

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


def solve(S: str):
    ret = None
    for i in range(26):
        c = chr(ord('a') + i)
        if not c in S:
            ret = c
            break
    print(ret)
    return


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:
#from collections import Counter
word = list(input())
word.sort()
#print(set(word))
#print(word)
ans = []
for i in [chr(i) for i in range(97, 97+26)]:
  n = word.count(i)
  if n == 0:
    ans.append(i)
    break
else:
    ans.append('None')
    
    
print(ans[0])

Submission status: Accepted

Solution code:
s = input()
S = list(set(s))
list.sort(S)
strings = "abcdefghijklmnopqrstuvwxyz"
switch = 0
for i in S:
    if i != strings[S.index(i)]:
        print(strings[S.index(i)])
        switch = 1
        break
    else:
        continue
if switch == 0:
    if len(strings) == len(S):
        print("None")
    else:
        print("z")

Submission status: Accepted

Solution code:
import string

result = "None"
str = list(set(input()))
for s in string.ascii_lowercase:
  if not s in str:
    result = s
    break
print(result)

Submission status: Accepted

Solution code:
S= input()

abs = 'abcdefghijklmnopqrstuvwxyz'

for ab in abs:
  if not ab in S:
    print(ab)
    exit()
else: print('None')

Submission status: Accepted

Solution code:
import sys

s = list(set(list(input())))
s.sort()
#print(s)
for i in range(len(s)):
    if s[i] != chr(ord("a") + i):
        print(chr(ord("a") + i))
        sys.exit()
if len(s) < 26:
  	print(chr(ord("a") + len(s)))
else:
	print("None")

Submission status: Accepted

Solution code:
import sys

s = list(input())
set_s = set(s)
new_s = list(set_s)
new_s.sort()
for i in range(26):
    if ord(new_s[i]) != 97+i:
        print(chr(97+i))
        sys.exit()
    if len(new_s) == i+1:
        if i == 25:
            break
        print(chr(98+i))
        sys.exit()
print('None')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())
s = set(s)
ls = [chr(i) for i in range(97, 97+26)]
ls = set(ls)
b = ls-s
b = list(b)
if  b == []:
    print("None")
else:
    b.sort()
    print(b[0])

Submission status: Accepted

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