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 = sorted(list(set(input()))) + ["A"] *26
t = "abcdefghijklmnopqrstuvwxyz"

ans = "None"
for i in range(len(t)):
	if s[i] != t[i]:
		ans = (t[i])
		break
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

s = input()

alph = 'abcdefghijklmnopqrstuvwxyz'
ar = [0 for i in range(26)]

for i in range(len(s)):
    ar[alph.find(s[i])] += 1

for i in range(len(s)):
    if 0 not in ar:
        print('None')
        break
    if ar[i] == 0:
        print(alph[i])
        break

Submission status: Accepted

Solution code:
S = set(input())
A = set(chr(i + ord('a')) for i in range(26))
B = sorted(A - S)
if B:
    print(B[0])
else:
    print("None")

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict
inf=float('inf')
mod = 10**9+7
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    S = ST()
    d = defaultdict(int)
    for s in S:
        d[s] += 1
    for i in range(26):
        if d[chr(i + ord("a"))] == 0:
            print(chr(i + ord("a")))
            exit()
    print("None")

            
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def judge(lst):
	for i in range(0, 26):
		if lst[i] == 0: return str(chr(i+97))
	return('None')

S = input()
countlist = []
for i in range(0, 26):
	countlist.append(0)
for i in range(0, len(S)):
	countlist[ord(S[i])-97] += 1
print(judge(countlist))

Submission status: Accepted

Solution code:
s = input()
char = {i for i in s}
if len(char) == 26:
    print('None')
else:
    for i in 'abcdefghijklmnopqrstuvwxyz':
        if i not in char:
            print(i)
            break

Submission status: Accepted

Solution code:
s = input()

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

for _s in s:
    if _s in alphabet:
        alphabet.remove(_s)
if not alphabet:
    print('None')
else:
    print(alphabet[0])

Submission status: Accepted

Solution code:
S = list(input())
a_to_z = "abcdefghijklmnopqrstuvwxyz"
S.sort()
ans = "None"
for string in a_to_z:
    if string not in S:
        ans = string
        break
print(ans)

Submission status: Accepted

Solution code:
s = input()
ans = []
for i in range(ord("a"),ord("z")+1):
    if chr(i) not in s:
        ans.append(chr(i))

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

Submission status: Accepted

Solution code:
s=list(input())
az="abcdefghijklmnopqrstuvwxyz"
s.sort()
ans="None"
for i in az:
    if i not in s:
      ans=i
      break
print(ans)

Submission status: Accepted

Solution code:
s = input()

ans = [ chr(i) for i in range(ord("a"),ord("z")+1) if chr(i) not in s]

ans.sort()

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

Submission status: Accepted

Solution code:
S = sorted(list(set(input())))
Alphabet = "abcdefghijklmnopqrstuvwxyz"
for i in Alphabet:
    if i not in S:
        print(i)
        exit()
print("None")

Submission status: Accepted

Solution code:
S = list(input())
S = list(set(S))
count = 0

Alpha = ["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 a in Alpha:
    for s in S:
        if s != a:
            count += 1
        else:
            break
        
    if  count == len(S):
        print(a)
        exit()
    else:
        count = 0

print('None')

Submission status: Accepted

Solution code:
s = list(input())
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"]
for i in range(len(s)):
    if s[0] in abc:
        abc.remove(s.pop(0))
    else:
        s.pop(0)
if len(abc) == 0:
    print("None")
else:
    print(abc[0])

Submission status: Accepted

Solution code:
s = input()
alpha = "abcdefghijklmnopqrstuvwxyz"
out = ""

for a in alpha :
	if a not in s :
		out = a
		break
print(out if out != "" else "None")

Submission status: Accepted

Solution code:
S=list(input())
S= list(set(S))
J=[]
S.sort()
for i in range(97,123):
    A=chr(i)
    J.append(A)
for i in S:
    J.remove(i)
if len(J)==0:
    print('None')
else:
    print(J[0])

Submission status: Accepted

Solution code:
#alphabet="abcdefghijklmnopqrstuvwxyz"
alphabet = [chr(ord('a')+i) for i in range(26)]
S=list(set(input()))
S.sort()

for i in alphabet:
    if i not in S:
        print(i)
        exit()
print("None")

Submission status: Accepted

Solution code:
import string

S=set(input())
letters_set=set(string.ascii_lowercase)
a=letters_set-S

if len(a)==0:
    print('None')
else:
    print(sorted(list(a))[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 S:
        print(i)
        exit()

print('None')

Submission status: Accepted

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

ALPHABETS = "abcdefghijklmnopqrstuvwxyz"


def solve(S: str):
    for alphabet in ALPHABETS:
        if alphabet not in S:
            print(alphabet)
            return
    print("None")
    return


# Generated by 1.1.4 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=input()
ans='a'

while ans in S and ord(ans)!=ord('z')+1:
    ans=chr(ord(ans)+1)

print(ans if ord(ans)!=ord('z')+1 else 'None')

Submission status: Accepted

Solution code:
S = [ord(c) for c in list(input())]

def main():
    ans = None
    for n in range(ord('a'), ord('z') + 1):
        if S.count(n) == 0:
            ans = chr(n)
            break
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
l=set(input())


x={"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(x-l))
print("None" if ans==[] else ans[0])

Submission status: Accepted

Solution code:
ori = "abcdefghijklmnopqrstuvwxyz"
s = input()
for i in range(len(s)):
    ori = ori.replace(s[i], "")
if len(ori) == 0:
    print("None")
else:
    print(ori[0])

Submission status: Accepted

Solution code:
s = input()
az = [0]*26
for c in s:
    az[ord(c)-ord("a")]=1
if sum(az)==26:
    print("None")
else:
    print(chr(ord("a")+az.index(0)))

Submission status: Accepted

Solution code:
S = sorted(list(set(input())))
Alphabet = "abcdefghijklmnopqrstuvwxyz"
for i in Alphabet:
    if i not in S:
        print(i)
        exit()
print("None")

Submission status: Accepted

Solution code:
s = input()
s_list = []
alphabet_list = [chr(i) for i in range(97, 123)]
count = 0
exit = 0

for i in s:
    s_list.append(i)

for j in range(len(alphabet_list)):
    alphabet = alphabet_list[j]
    count = 0
    for k in range(len(s_list)):
        if alphabet == s[k]:
            count += 1
    if count == 0:
        print(alphabet)
        break
    else:
        exit += 1

if exit == len(alphabet_list):
    print("None")

Submission status: Accepted

Solution code:
s = input()
def is_alpha(s):
  if len(set(s)) == 26:
    return 'None'
  al = {chr(i):0 for i in range(97, 97+26)}
  for i in s:
    al[i] +=1
  result = []
  for k, v in al.items():
    if v == 0:
      result.append(k)
  return min(result)


print(is_alpha(s))

Submission status: Accepted

Solution code:
# 2019/05/24
# AtCoder Beginner Contest 071 - B

# Input
s = input()

cl = ["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 i in range(len(cl)):
    exflg = False
    for j in range(len(s)):
        if s[j] == cl[i]:
            exflg = True
            break
    if exflg == False:
        ans = cl[i]
        break

# Output
print(ans)

Submission status: Accepted

Solution code:
X = set()
for x in input():
  X.add(x)
X = sorted(X)
codeA = "a".encode("sjis")[0]
codes = [bytes([codeA + i]).decode("sjis") for i in range(26)]
codes.append("None")
print(codes[sum([1 for i, x in enumerate(X) if x == codes[i]])])

Submission status: Accepted

Solution code:
X = set()
for x in input():
  X.add(x)
X = sorted(X)
c = bytes(["a".encode("sjis")[0] + sum([1 for i, x in enumerate(X) if x.encode("sjis")[0] == "a".encode("sjis")[0] + i])]).decode("sjis")

if c.encode("sjis")[0] > "z".encode("sjis")[0]:
  c = "None"

print(c)

Submission status: Accepted

Solution code:
from string import ascii_lowercase
s = input()
for chr in ascii_lowercase:
    if not chr in s:
        print(chr)
        exit()
print('None')

Submission status: Accepted

Solution code:
s = input()
alist = [chr(i) for i in range(97,97+26)]
count = 0
for j in alist:
    if j not in s:
        print(j)
        break
    else:
        count += 1
if count == 26:
    print(None)

Submission status: Accepted

Solution code:
from sys import exit, stdin
from string import ascii_lowercase
s = set(stdin.readline().rstrip())
ansl = list(set(ascii_lowercase)-s)
ansl.sort()
if ansl:
    print(ansl[0])
else:
    print('None')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
ss = set()
for c in s:ss.add(c)
for b in 'abcdefghijklmnopqrstuvwxyz':
    if not b in ss:
        print(b)
        break
else:print('None')

Submission status: Accepted

Solution code:
S = input()
komoji = "abcdefghijklmnopqrstuvwxyz"
for char in komoji:
    if S.count(char) == 0:
        print(char)
        exit()
print("None")

Submission status: Accepted

Solution code:
s=list(input())
s=list(set(s))
s.sort()
key='A'
for i in range(len(s)-1):
    if s[i+1]!=chr(ord(s[i])+1):
        key=chr(ord(s[i])+1)
        break
            
if len(s)==1:
    print(chr(ord(s[0])+1))
elif len(s)==26:
    print('None')
elif key!='A' and s[0]=="a": print(key)
elif key!='A' and s[0]!="a": print("a")
else: print(chr(ord(s[len(s)-1])+1))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

a = set(map(chr, range(ord('a'), ord('z')+1)))
s = set(input())
ans = a-s
print(min(ans) if ans else 'None')

Submission status: Accepted

Solution code:
S = input()
for c in 'abcdefghijklmnopqrstuvwxyz':
  if S.count(c) == 0:
    print(c)
    break
else:
    print('None')

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())

for code in range(ord('a'), ord('z')+1):
    if chr(code) not in S:
        print(chr(code))
        break
else:
    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"] 
B = [0]*26
flag = -1

for i in range(len(S)):
  
  for j in range(len(A)):
    if S[i] == A[j]:
      B[j] += 1
      break
  
  if i == len(S):
    break

for k in range(len(B)):
  if B[k] == 0:
    print(A[k])
    flag = 1
    break
    
if flag == -1:
  print("None")

Submission status: Accepted

Solution code:
s = input()

for i in range(26):
    if chr(i + 97) not in s:
        print(chr(i + 97))
        quit()
print(None)

Submission status: Accepted

Solution code:
s = sorted(input())

for i in range(26):
    if chr(i + 97) not in s:
        print(chr(i + 97))
        exit()
print(None)

Submission status: Accepted

Solution code:
s = sorted(input())

for i in range(26):
    if chr(i + 97) not in s:
        print(chr(i + 97))
        quit()
print(None)

Submission status: Accepted

Solution code:
import string

s_lower_alpha = set(string.ascii_lowercase)
s_S = set(input())
ret = sorted(list(s_lower_alpha - s_S))

if len(ret) > 0:
    print(ret[0])
else:
    print('None')

Submission status: Accepted

Solution code:
# 入力
S=input()

# a〜z
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 x in l:
  if x not in S:
    print(x)
    exit()

print('None')

Submission status: Accepted

Solution code:
s=set(input())
a=set([chr(i) for i in range(97,97+26)])
print('None' if s==a else min(s^a))

Submission status: Accepted

Solution code:
s=set(list(input()))
a=set('abcdefghijklmnopqrstuvwxyz')
print('None' if s==a else min(s^a))

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-

def solve():
    S = input()
    S = list(S)
    S.sort()

    # 重複した文字を削除する
    import copy
    tmpS = copy.deepcopy(S)
    S = []
    S.append(tmpS[0])
    for i in range(1, len(tmpS)):
        if S[-1] == tmpS[i]:
            continue
        S.append(tmpS[i])

    ans = "a"
    for moji in S:
        if ans == moji:
            ans = chr(ord(ans)+1)
            continue
        
        break
    if ans == "{":
        print("None")
    else:
        print(ans)


if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
import sys
S = input()
alphabet = [chr(_) for _ in range(ord("a"), ord("z") + 1)]
l_unique = set(list(S))
for i in alphabet:
    if i not in l_unique:
        print(i)
        sys.exit()
else:
    print("None")

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc071/tasks/abc071_b
import string
S = list(input())
alf = [False]*26
for s in S:
    alf[ord(s)-ord("a")] = True

for a in range(len(alf)):
    if not alf[a]:
        print(chr(a+97))
        break
        
    elif a == len(alf)-1:
        print("None")

Submission status: Accepted

Solution code:
S=list(input())
S=set(S)
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'}
B=list(A-S)
B.sort()
if len(B)>0:
    print(B[0])
else:
    print('None')

Submission status: Accepted

Solution code:
S = input()

candidates = {
    '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'
} - set(S)
if len(candidates) == 0:
    print('None')
    exit(0)
candidates = list(candidates)
candidates.sort()
print(candidates[0])

Submission status: Accepted

Solution code:
s=set(list(input()))
alpha=list("abcdefghijklmnopqrstuvwxyz")
for i in reversed(range(len(alpha))):
    if alpha[i] in s:
        alpha.pop(i)
if alpha == []:
    print("None")
else:
    print(alpha[0])

Submission status: Accepted

Solution code:
s = input()
binary = {}
alphabet = "abcdefghijklmnopqrstuvwxyz"
flag = False
for i in alphabet:
    binary[i] = 0
for j in s:
    binary[j] = 1
for k in alphabet:
    if binary[k] == 0:
        print(k)
        break
    if "z" == k:
        print("None")

Submission status: Accepted

Solution code:
s = set(input())
a_z = {chr(s) for s in range(ord("a"), ord("z")+1)}
s_diff = a_z - s
print(sorted(s_diff)[0] if s_diff else "None")

Submission status: Accepted

Solution code:
s=str(input())
flag=True
t=[chr(ord('a') + i) for i in range(26)]
for i in range(len(t)):
    if t[i] not in s:
        flag=False
        print(t[i])
        break
    else:
        pass
if flag:
    print("None")

Submission status: Accepted

Solution code:
xs = set(range(ord("a"),ord("z")+1)) - set(map(ord, input()))
print(chr(min(xs)) if len(xs) else "None")

Submission status: Accepted

Solution code:
"""
文字列lの？個目が文字列Sに含まれたらansの？個目は0，含まれなかったら1
ansの要素を全部足して0だったら文字列Sにはアルファベットが全て含まれる
range(25)にしていた
これだとiが0~24まで25回しか繰り返していない
"""
s=input()
l="abcdefghijklmnopqrstuvwxyz"
ans=[0]*26
for i in range(26):
    if l[i] not in s:
        ans[i]=1
    else:
        ans[i]=0
if sum(ans[x] for x in range(26))>0:
    print(l[ans.index(1)])
else:
    print("None")

Submission status: Accepted

Solution code:
s = input()
flag_yes = 0
for i in range(97, 97 + 26):
  if chr(i) not in s:
    flag_yes = 1
    ans = chr(i)
    break
if flag_yes == 1:
  print(ans)
else:
  print("None")

Submission status: Accepted

Solution code:
x = list(input())
a = "abcdefghijklmnopqrstuvwxyz"
res = "None"
for i in range(len(a)):
  if a[i] not in x:
    res = a[i]
    break
print(res)

Submission status: Accepted

Solution code:
import sys
s=input()
s=set(x for x in s)
for i in range(97,97+26):
    l=chr(i)
    if not l in s:
        print(l)
        sys.exit()
print('None')

Submission status: Accepted

Solution code:
import string 
L = string.ascii_lowercase
S = list(str(input()))
ans = ''
for l in L:
  if l not in S:
    ans =l
    break
if ans != '':
  print(ans)
else:
  print("None")

Submission status: Accepted

Solution code:
a='abcdefghijklmnopqrstuvwxyz'
b=list(input())
for i in a:
    if i not in b:
        ans=i
        break
print(i if len(set(b))!=26 else '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"]
ans=["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] in s:
        ans.remove(l[i])
if ans==[]:
    print("None")
else:
    print(ans[0])

Submission status: Accepted

Solution code:
S = set(input())
ans = list("abcdefghijklmnopqrstuvwxyz")+[None]
for c in S:
    if c in ans:
        ans.remove(c)
print(ans[0])

Submission status: Accepted

Solution code:
s=list(str(input()))

x=["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 = set(sorted(s))

result=list(set(x)-set(S))

result=sorted(result)

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

Submission status: Accepted

Solution code:
import string

char = string.ascii_lowercase
s = input()

for i in char:
    ans = i
    if s.count(i):
        continue
    else:
        print(ans)
        quit()
print('None')

Submission status: Accepted

Solution code:
s = input()
ans = None
for i in range(ord("a"), ord("z")+1):
    c = chr(i)
    if c not in s:
        ans = c
        break
print(ans)

Submission status: Accepted

Solution code:
l=list("abcdefghijklmnopqrstuvwxyz")
w=list(input())
b=True
for i in l:
  if not(i in w):
    print(i)
    b=False
    break
if b:
  print("None")

Submission status: Accepted

Solution code:
S=list(input())
a = list("abcdefghijklmnopqrstuvwxyz")
a.append("None")
print([x for x in a if not(x in S)][0])

Submission status: Accepted

Solution code:
import string


def solve(s):
  asc = string.ascii_lowercase
  for c in asc:
    if c not in s:
      return c


s = str(input())
print(solve(s))

Submission status: Accepted

Solution code:
S = list(input())
a = list("abcdefghijklmnopqrstuvwxyz")
a.append("None")
print([x for x in a if not(x in S)][0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
for c in "abcdefghijklnmopqrstuvwxyz":
    if not c in s:
        print(c)
        exit()
print(None)

Submission status: Accepted

Solution code:

def read_input():
    s = input()
    return s

def submit():
    s = read_input()

    char_appear = {}
    for c in s:
        char_appear[c] = 1

    test = 'abcdefghijklmnopqrstuvwxyz'
    for t in test:
        if t not in char_appear.keys():
            print(t)
            return
    print('None')


if __name__ == '__main__':
    submit()

Submission status: Accepted

Solution code:
import string
import sys
from collections import Counter

s = input()
all = string.ascii_lowercase
rest = list(set(all) - set(s))

if len(rest) == 0:
    print('None')
else:
    print(sorted(rest)[0])

Submission status: Accepted

Solution code:
import sys
from collections import Counter

s_set = set(input())
alph = 'abcdefghijklmnopqrstuvwxyz'

for i in alph:
    if not i in s_set:
        print(i)
        sys.exit()

print('None')

Submission status: Accepted

Solution code:
# ABC071B - Not Found
import string

s = set(input())
lw = set(string.ascii_lowercase)
dif = lw - s
if dif == set():
    print("None")
else:
    print(sorted(list(dif))[0])

Submission status: Accepted

Solution code:
S = sorted(list(set(input())))
sss = "abcdefghijklmnopqrstuvwxyz"
for s in sss:
    if s not in S:
        print(s)
        exit()
print("None")

Submission status: Accepted

Solution code:
S = list(input())

AL = [chr(i) for i in range(97, 97 + 26)]
f = 0
for al in AL:
    if al not in S:
        f = 1
        break

print(al) if f else print('None')

Submission status: Accepted

Solution code:
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    s = input()
    ss = set(s)
    if len(ss) == 26:
        print('None')
    else:
        for i in range(26):
            if chr(ord('a')+i) not in ss:
                print(chr(ord('a')+i))
                return

solve()

Submission status: Accepted

Solution code:
from functools import reduce
import math

def main():
    # 文字列の2進数を数値にする
    # '101' → '5'
    # 文字列の頭に'0b'をつけてint()にわたす
    # binary = int('0b'+'101',0)

    # 2進数で立っているbitを数える
    # 101(0x5) → 2
    # cnt_bit = bin(5).count('1')
    
    # N! を求める
    # f = math.factorial(N)

    # N の逆元
    # N_inv = pow(N,MOD-2,MOD)

    # nCr
    # Nの階乗 * rの階乗の逆元 * n-rの階乗の逆元
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    INF = float("inf")

    # 大きな素数
    MOD = 10**9+7
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    S = input().rstrip()
    alphabets = 'abcdefghijklmnopqrstuvwxyz'
    ans = 'None'
    for a in alphabets:
        if S.count(a) < 1:
            ans = a
            break
    print(ans)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
d = {chr(i) for i in range(ord('a'), ord('z') + 1)} - {c for c in input()}
print('None' if len(d) == 0 else sorted(list(d))[0])

Submission status: Accepted

Solution code:
s=set(input())
ab=set([chr(i) for i in range(97,97+26)])
ans=sorted(ab-s)
print('None' if not ans else ans[0])

Submission status: Accepted

Solution code:
S = input()

for a in 'abcdefghijklmnopqrstuvwxyz':
    if not a in S:
        print(a)
        quit()
print('None')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
try:
    from math import gcd
except Exception:
    from fractions import gcd


def solve(S: str):
    res = sorted(list(set([chr(c) for c in range(ord('a'),ord('z')+1)]) - set(S)))
    return 'None' if len(res) == 0 else res[0]

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
    result = solve(S)
    print(result)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()
cnt = [0]*26
for c in s:
    cnt[ord(c)-ord("a")] += 1
ans = "None"
for i in range(26):
    if cnt[i] == 0:
        ans = chr(ord("a")+i)
        break
print(ans)

Submission status: Accepted

Solution code:
s = input()
n = len(s)
l = list(set(s))
l.sort()
import string
o = 'None'
for v in string.ascii_lowercase:
  if v not in l:
    o = v
    break
print(o)

Submission status: Accepted

Solution code:
S = input()

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

for x in alphabet:
    if x in S:
        continue
    else:
        print(x)
        exit()

print('None')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=set(input());a=[i for i in range(26)if chr(i+97)not in s];print(chr(min(a)+97)if len(a)>0else 'None')

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 = input()
for i in range(26):
	if not A[i] in S:
		print(A[i])
		exit()
print("None")

Submission status: Accepted

Solution code:
import string
alphas = string.ascii_lowercase

S = input()

for al in alphas:
    if al in S:
        continue
    else:
        print(al)
        exit()
print("None")

Submission status: Accepted

Solution code:
alpha = "abcdefghijklmnopqrstuvwxyz"
S = input()
flag = True
for i in alpha:
  if i in S:
    pass
  else:
    print(i)
    flag = False
    break
    
if flag:
  print("None")

Submission status: Accepted

Solution code:
# -*- coding utf-8 -*-
import sys
s=list(str(input()))
x=["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(x)):
    if x[i] in s:
        pass
    else:
        print(x[i])
        sys.exit()


print("None")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
S = input()
alp = 'abcdefghijklmnopqrstuvwxyz'
for i in alp:
    if i not in S:
        print(i)
        sys.exit()

print('None')

Submission status: Accepted

Solution code:
S = input()

atoz = 'abcdefghijklmnopqrstuvwxyz'
ans = 'None'
for al in atoz:
    if al in S:
        continue
    else:
        ans = al
        break

print(ans)

Submission status: Accepted

Solution code:
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import math


S = str(input())

# print(S)
all = list("abcdefghijklmnopqrstuvwxyz")
all.sort()
for i in range(len(S)):
    if S[i] in all:
        all.remove(S[i])

if len(all) > 0:
    print(all[0])
else:
    print("None")

Submission status: Accepted

Solution code:
alfabets = [chr(i) for i in range(97,97+26)]
a = []
s = input()
for i in s :
    a += i
s1 = set(alfabets)
s2 = set(a)
aaa = s1 - s2
alfabets = list(aaa)
alfabets.sort()
if alfabets == [] :
    print('None')
else : 
    print(alfabets[0])

Submission status: Accepted

Solution code:
S = input()
check = [False] * 26
for i in S:
    check[ord(i)-ord('a')] = True

ans = 'None'
for i in range(len(check)):
    if check[i]:
        continue
    else:
        ans = chr(i+ord('a'))
        break
print(ans)

Submission status: Accepted

Solution code:
import string

s = input()

left_character_set = set(string.ascii_lowercase) - set(s)
print(chr(min(ord(c) for c in left_character_set)) if len(left_character_set) > 0 else "None")

Submission status: Accepted

Solution code:
chars=list(input())
d_unique=list(set(chars))

if len(d_unique)==26:
    print("None")
elif "a" not in d_unique:
    print("a")
elif "b" not in d_unique:
    print("b")
elif "c" not in d_unique:
    print("c")
elif "d" not in d_unique:
    print("d")
elif "e" not in d_unique:
    print("e")
elif "f" not in d_unique:
    print("f")
elif "g" not in d_unique:
    print("g")
elif "h" not in d_unique:
    print("h")
elif "i" not in d_unique:
    print("i")
elif "j" not in d_unique:
    print("j")
elif "k" not in d_unique:
    print("k")
elif "l" not in d_unique:
    print("l")
elif "m" not in d_unique:
    print("m")
elif "n" not in d_unique:
    print("n")
elif "o" not in d_unique:
    print("o")
elif "p" not in d_unique:
    print("p")
elif "q" not in d_unique:
    print("q")
elif "r" not in d_unique:
    print("r")
elif "s" not in d_unique:
    print("s")
elif "t" not in d_unique:
    print("t")
elif "u" not in d_unique:
    print("u")
elif "v" not in d_unique:
    print("v")
elif "w" not in d_unique:
    print("w")
elif "x" not in d_unique:
    print("x")
elif "y" not in d_unique:
    print("y")
elif "z" not in d_unique:
    print("z")

Submission status: Accepted

Solution code:
s=input()
n=[0]*26
for i in s:n[ord(i)-97]=1
else:print("None" if sum(n)==26 else chr(97+n.index(0)))

Submission status: Accepted

Solution code:
S=input()
d=[chr(i) for i in range(97,97+26)]
d.sort(reverse=True)
ans='None'
for j in d:
    if S.find(j)==-1:
        ans=j
print(ans)

Submission status: Accepted

Solution code:
*S, = sorted(set(input()))
for i, s in enumerate(S):
	lowest = ord(s) - 1
	if ord("a") <= lowest and chr(lowest) not in S:
		print(chr(lowest))
		break
else:
	if ord(S[-1]) < ord("z"):
		print(chr(ord(S[-1])+1))
	else:
		print("None")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
l=len(s)
alpha=['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(l):
  for j in range(26):
    if s[i]==alpha[j]:
      ans[j]+=1
for i in range(26):
  if ans[i]==0:
    print(alpha[i])
    break
  if i==25:
    print('None')

Submission status: Accepted

Solution code:

import sys
import string

alphabets = string.ascii_lowercase
s = input()

for i in alphabets:
    if i not in s:
        print(i)
        sys.exit()

print("None")