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()
s = [S[_] for _ in range(len(S))]
s.sort()

judge = "abcdefghijklmnopqrstuvwxyz"
for i in range(len(s)):
  judge = judge.lstrip(s[i])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

if len(set(S)) == 26:
  print("None")
else:
  for dam in ["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 not dam in list(set(S)):
           break
  print(dam)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
a=list("abcdefghijklmnopqrstuvwxyz")
for x in a:
    if x not in s:
        print(x)
        exit()
print("None")

Submission status: Accepted

Solution code:
S = input()
alphabet = "abcdefghijklmnopqrstuvwxyz"
A = list(alphabet)
for x in A:
    if x not in S:
        print(x)
        exit()
print("None")

Submission status: Accepted

Solution code:
S = 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']
ans = ''
flg = False
for s in alp:
  if s not in S:
    ans = s
    flg = True
    break
if flg:
  print(ans)
else:
  print('None')

Submission status: Accepted

Solution code:
s = list(input())
sl = list(int(ord(i)) for i in s)

for i in range(97, 123):
    if sl.count(i) == 0:
        print(chr(i))
        exit()
else:
    print('None')

Submission status: Accepted

Solution code:
def notfound(s):

    ans = ""
    for code in range(ord('a'), ord('z') + 1):
        if s.count(chr(code)) == 0:
            return chr(code)
    return "None"

def main():
    s = str(input())
    print(notfound(s))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = sorted(input())
a = [i for i in range(26)]

for i in a:
    if s.count(chr(i + ord("a"))) == 0:
        print(chr(i + ord("a")))
        exit()

print("None")

Submission status: Accepted

Solution code:
s=list(input())
lis=[]
for i in range(26):
    lis.append(chr(97+i))
for i in range(len(s)):
    if s[i] in lis:
        lis.remove(s[i])
if len(lis)>0: print(lis[0])
else: print('None')

Submission status: Accepted

Solution code:
s=input()
ans=1
all="abcdefghijklmnopqrstuvwxyz"
for i in all:
    if i not in s:
        print(i)
        ans=0
        break
if ans==1:
    print("None")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str = input()
alpha = [chr(i) for i in range(ord('a'), ord('z')+1)]
ans = "None"
for id in alpha:
    if id not in str: 
        ans = id
        break
print(ans)

Submission status: Accepted

Solution code:
alpha = [chr(i) for i in range(ord("a"), ord("a")+26)]
s = input()
for i in alpha:
    if i not in s:
        print(i)
        break
    if i == "z":
        print(None)

Submission status: Accepted

Solution code:
def main():
    s=set(input())
    for a in 'abcdefghijklmnopqrstuvwxyz':
        if a not in(s):
            print(a)
            return
    print('None')

main()

Submission status: Accepted

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

Submission status: Accepted

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

S = set(input())

if len(set(alpha)) == len(S):
    print('None')
else:
    for s in alpha:
        if s not in S:
            print(s)
            exit()

Submission status: Accepted

Solution code:
s = list(input())
abc = list('abcdefghijklmnopqrstuvwxyz')
abc_exist = [False] * 26

for i in range(len(s)):
  for j in range(26):
    if s[i] == abc[j]:
      abc_exist[j] = True

r = 'None'      
for k in range(26):
  if abc_exist[k] == False:
    r = abc[k]
    break
    

print(r)

Submission status: Accepted

Solution code:
s = set(input())
abc = set('abcdefghijklmnopqrstuvwxyz')
nots = abc.difference(s)
if len(nots) == 0:
  print('None')
else:
  print(min(nots))

Submission status: Accepted

Solution code:
try:
    S = input()
    alphabet_lower = [chr(ord('a')+i) for i in range(26)]
    S_ = set(sorted(S))
    ans = set(alphabet_lower)-S_
    try:
        print(sorted(ans)[0])
    except IndexError:
        print('None')
except EOFError:
    pass

Submission status: Accepted

Solution code:
alphabet = [i for i in "abcdefghijklmnopqrstuvwxyz"]
# print(alphabet)
S = input()
S_list = [i for i in S]
S_list = sorted(set(S_list),reverse=False)

ans = "a"

for index,i in enumerate(S_list):
    if S_list == alphabet:
        ans = None
        break
    else:
        if i != alphabet[index]:
            ans = alphabet[index]
            break
        else:
            ans = alphabet[index+1]

print(ans)

Submission status: Accepted

Solution code:
S=input()
flag=0
l=[0]*26
for i in range(len(S)):
    if (0<=(ord(S[i])-97))and((ord(S[i])-97)<26):
        l[ord(S[i])-97]=l[ord(S[i])-97]+1
for i in range(26):
    if l[i]==0:
        print(chr(i+97))
        flag=1
        break
if flag==0:
    print("None")

Submission status: Accepted

Solution code:
from string import ascii_lowercase
s=set(input())
l=sorted([x for x in ascii_lowercase if not x in s])
if l:
  print(l[0])
else:
  print("None")

Submission status: Accepted

Solution code:
s_in = input()
s = set(s_in)
lst = [ord(i) - ord('a') for i in s]
lst.sort()
for i in range(26):
    if not i in lst:
        print(chr(i + ord('a')))
        break
    elif i == 25:
        print('None')

Submission status: Accepted

Solution code:
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"]

s = input()
for i in range(26):
    if ALPHABET[i] not in s:
        print(ALPHABET[i])
        break
else:
    print("None")

Submission status: Accepted

Solution code:
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"]

s = input()
for i in range(26):
    if s.count(ALPHABET[i]) == 0:
        print(ALPHABET[i])
        break
else:
    print("None")

Submission status: Accepted

Solution code:
ALPHABET = "abcdefghijklmnopqrstuvwxyz"

s = input()
for i in range(26):
    if s.count(ALPHABET[i]) == 0:
        print(ALPHABET[i])
        break
else:
    print("None")

Submission status: Accepted

Solution code:
ALPHABET = "abcdefghijklmnopqrstuvwxyz"

s = list(input())
for i in range(26):
    if ALPHABET[i] not in s:
        print(ALPHABET[i])
        break
else:
    print("None")

Submission status: Accepted

Solution code:
ALPHABET = "abcdefghijklmnopqrstuvwxyz"

s = list(input())
for i in ALPHABET:
    if i not in s:
        print(i)
        break
else:
    print("None")

Submission status: Accepted

Solution code:
ALPHABET = "abcdefghijklmnopqrstuvwxyz"

s = list(input())
s.sort()
for i in ALPHABET:
    if i not in s:
        print(i)
        break
else:
    print("None")

Submission status: Accepted

Solution code:
ALPHABET = "abcdefghijklmnopqrstuvwxyz"

s = list(input())
s.sort()
for i in ALPHABET:
    if not(i in s):
        print(i)
        break
else:
    print("None")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

dic1 = dict()

for i in s:
    if not i in dic1:
        dic1[i] = 1

for i in range(ord("a"),ord("z")+1):
    if not chr(i) in dic1:
        print(chr(i))
        exit()

print("None")

Submission status: Accepted

Solution code:
a = "abcdefghijklmnopqrstuvwxyz"
s = set(input())
c = 0

for i in s:
    a = a.replace(i,"")
    c += 1
if c < 26:
    print(a[0])
else:
    print("None")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import math


def main():
    S = list(input())
    for abc in 'abcdefghijklmnopqrstuvwxyz':
        if not abc in set(S):
            print(abc)
            exit(0)
    print('None')


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
strings = input()
alpha = [i for i in range(97, 123)]
srcset = set()
for c in strings:
    srcset.add(ord(c))
for c in srcset:
    alpha.remove(c)
dst = chr(alpha[0]) if alpha else None
print(dst)

Submission status: Accepted

Solution code:
s = input()
cout = "abcdefghijklmnopqrstuvwxyz"

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
alpha=[chr(x) for x in range(ord('a'),ord('z')+1)]

for ss in s:
    if ss in alpha:
        alpha.remove(ss)
        if len(alpha) == 0:
            alpha.append(None)

print(alpha[0])

Submission status: Accepted

Solution code:
S = input()

for i in range(97,123):
    a = chr(i)
    if a not in S:
        print(a)
        exit()

print("None")

Submission status: Accepted

Solution code:
s = input()
 
if len(set(s)) == 26:
  print("None")
else:
  for i in range(97, 123):
    if chr(i) not in s:
      print(chr(i))
      break

Submission status: Accepted

Solution code:
s=set(list(input()))
if len(s)==26:print(None)
else:
    for x in range(97,123):
        if not chr(x) in s:
            print(chr(x))
            break

Submission status: Accepted

Solution code:
s = input()
u = set()
for c in s:
  u.add(c)

for c in "abcdefghijklmnopqrstuvwxyz-":
  if(c == "-"):
    print("None")
  elif(c not in u):
    print(c)
    break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=list(input())
import string
X= list(string.ascii_lowercase)
for i in X:
    if i not in S:
        print(i)
        break
else:
    print("None")

Submission status: Accepted

Solution code:
s=input()
alphabet = set([chr(i) for i in range(97, 97+26)])
x=set([s[i] for i in range(len(s))])
y=alphabet - x
if len(y)==0:
  print("None")
  exit()
z=list(y)
z.sort()
print(z[0])

Submission status: Accepted

Solution code:
s = input()
da = 'abcdefghijklmnopqrstuvwxyz'
flag = True
for i in da:
  for j in s:
    if j == i:
      flag = False
  if flag:
    print(i)
    flag = False
    break
  else:
    flag = True
if flag:
  print('None')

Submission status: Accepted

Solution code:
a=set([chr(i) for i in range(97,97+26)])
l=set(input())
x=sorted(list(a^l))
print(x[0] if len(x)!=0 else "None")

Submission status: Accepted

Solution code:
s = input()
alph_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"]
res = [0] * 26
for i in range(len(s)):
    for j in range(26):
        if s[i] == alph_list[j]:
            res[j] = 1
for i in range(26):
    if res[i] == 0:
        print(alph_list[i])
        break
    elif i == 25:
        print("None")

Submission status: Accepted

Solution code:
import string
abc = list(string.ascii_lowercase)

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

for i in range(26):
    if abc[i] in S:
        continue
    else:
        print(abc[i])
        exit()
print('None')

Submission status: Accepted

Solution code:
import string
strings = string.ascii_lowercase
a = input()
ans = "None"
for i in strings:
    if i not in a:
        ans = i
        break

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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"]
num = [0] * 26
s = input()
for i in range(len(s)):
	num[ans.index(s[i])]+=1
for i in range(len(num)):
	if num[i] == 0:
		print(ans[i])
		exit()
print("None")

Submission status: Accepted

Solution code:
S = set(input())
for a in "abcdefghijklmnopqrstuvwxyz":
    if a not in S:
        print(a)
        break
else:
    print("None")

Submission status: Accepted

Solution code:
import numpy as np

def main():
    alphabet = list("abcdefghijklnopqrstuvwxyz")
    str = input()

    found_chars = sorted(set(str), key=lambda x:ascii(x))

    for chars in found_chars:
        if chars in alphabet:
            del alphabet[alphabet.index(chars)]

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



if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math
import sys

#n, a, b= map(int, input().split())
#n, x  = map(int, input().split())
s = list(str(input()))
#n = int(input())
#a = list(map(int, input().split()))

#a = [""]*n
#for i in range(n):
#  a[i] = int(input())

#for i in range(n):
alpha = [chr(i) for i in range(97, 97+26)]
s.sort()
count = 0
ii = 0
n = len(s)
n_alp = len(alpha) - 1
for i in range(n):
  if(s[i] == alpha[ii]):
    ans = alpha[ii]
    ii = ii + 1
    if(ii > n_alp):
      print('None')
      sys.exit()

print(alpha[ii])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
all_c = 'abcdefghijklmnopqrstuvwxyz'
all_key = set(all_c)

S = set(input())

dif = all_key - S

_dif = list(dif)
_dif.sort()

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

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 30, Jan, 2020
"""

import sys

# import itertools
# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

S = readline().decode('utf8').rstrip()
m = list('abcdefghijklmnopqrstuvwxyz')

sa = list(S)
sa = list(set(sa))
sa.sort()
ans = ''
for i in m:
    if not (i in sa):
        ans = i
        break

print(ans if ans else 'None')

Submission status: Accepted

Solution code:
import math
import calendar
import fractions
import itertools

s = input()

a = "abcdefghijklmnopqrstuvwxyz"
flag = 1
for i in a:
    if i not in s:
        flag = 0
        print(i)
        break
if flag == 1:
    print("None")

Submission status: Accepted

Solution code:
s=str(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"]
ans = "None"
sort_s = sorted(s)
# print(sort_s)
for i in abc:
    if (i in sort_s) == False:
        ans = i
        break
print(ans)

Submission status: Accepted

Solution code:
s = str(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"]
ans = "None"
sort_s = sorted(s)
for i in abc:
  if (i in sort_s)==False:
    ans = i
    break
print(ans)

Submission status: Accepted

Solution code:
from string import * 
s = input()
a = ascii_lowercase

for i in a:
    if i not in s:
        print(i)
        break
    if i == "z":
        print("None")
        break

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
s = input()
for i in range(26):
    if chr(97+i) not in s: 
        print(chr(97+i)) 
        break
    if i == 25:
        print("None")

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    alp='abcdefghijklmnopqrstuvwxyz'
    s=STR()
    flg=0
    for i in alp:
        if not(i in s):
            print(i)
            flg=1
            break
    if flg==0:
        print('None')
if __name__ == '__main__':
    do()

Submission status: Accepted

Solution code:
ans=ord("a")
for s in sorted(input()):
    if ord(s)>ans:
        print(chr(ans))
        break
    elif ord(s)==ans:
        ans+=1
else:
    if ans==ord("z")+1:
        print("None")
    else:
        print(chr(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections
S=sorted(str(input()))
#print(*S)
A=[]
L = collections.Counter(S)
values, counts = zip(*L.most_common())
for i in range(len(values)):
  A.append(values[i])
A.sort()

x=0
for i in range(len(A)):
  if ord(A[i])!=i+97:
    x=i+97
    break
if x!=0:
  print(chr(i+97))    
else:
  if len(A)==25:
    print("z")
  else:
    print("None")

Submission status: Accepted

Solution code:
s = list(set([ord(i) for i in input()]))
for i in range(ord('a'), ord('a')+26):
  if i not in s:
    print(chr(i))
    break
else:
  print('None')

Submission status: Accepted

Solution code:
S = input()
S = set(list(S))
alp = [chr(ord('a') + i) for i in range(26)]
for al in alp:
    if al in S:
        pass
    else:
        print(al)
        exit()
print("None")

Submission status: Accepted

Solution code:
import string

S = set(input())
s_list = list(string.ascii_lowercase)

for s in S:
    s_list.remove(s)

if s_list:
    print(s_list[0])
else:
    print('None')

Submission status: Accepted

Solution code:
import string
letters=string.ascii_lowercase
s=set(input())
print(min((set(letters)^s) or ["None"]))

Submission status: Accepted

Solution code:
S = input()

t = list(sorted(list(set(chr(i) for i in range(ord('a'), ord('z') + 1)) - set(S))))
if len(t) == 0:
    print('None')
else:
    print(t[0])

Submission status: Accepted

Solution code:
string=input()
s=set(list(string))

full=set(list("abcdefghijklmnopqrstuvwxyz"))

tmp=full-s
if len(tmp)==0:
  print("None")
  exit()
print(min(tmp))

Submission status: Accepted

Solution code:
s = input()
alpha_list = "abcdefghijklmnopqrstuvwxyz"
s = set(s)
for letter in alpha_list:
    if letter not in s:
        print(letter)
        break
    else:
        continue
else:
    print("None")

Submission status: Accepted

Solution code:
S = set(input())
all = 'abcdefghijklmnopqrstuvwxyz'
# print(S)
# print(all)
# print(S - all)
for i in range(len(all)):
    if not all[i] in S:
        print(all[i])
        exit()

print('None')

Submission status: Accepted

Solution code:
import sys
s=list(input())
s=list(set(s))
s.sort()
s.append("eof")

for i in range(26):
    if chr(ord("a")+i)!=s[i]:
        print(chr(ord("a")+i))
        sys.exit()
print("None")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin, stdout

s = stdin.readline().strip('\n')
al = [True for i in range(26)]
for i in s:
  al[ord(i) - 97] = False
for i in range(97, 123):
  if al[i - 97]:
    stdout.write(str(chr(i)) + '\n')
    break
else:
  stdout.write('None\n')

Submission status: Accepted

Solution code:
import string
alphabet = set(list(string.ascii_lowercase))
s = set(input())
rest = sorted(alphabet - s)

ans = rest[0] if rest else 'None'

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = set(chr(ord("a")+i) for i in range(26))-set(input())
print(min(S) if S else "None")

Submission status: Accepted

Solution code:
s = str(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"]

for i in s:
    if i in alphabet:
        alphabet.remove(i)
if len(alphabet)!=0:
    print(alphabet[0])
else:
    print("None")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=str(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"]
for i in s:
    if i in alphabet:
        alphabet.remove(i)
if len(alphabet)!=0:
    print(alphabet[0])
else:
    print("None")

Submission status: Accepted

Solution code:
s = set(input())

alphabet = "abcdefghijklmnopqrstuvwxyz"

for l in alphabet:
  if l not in s:
    print(l)
    break
else:
  print("None")

Submission status: Accepted

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

for i in list:
    if i not in s:
        print(i)
        exit()
print('None')

Submission status: Accepted

Solution code:
S = set(input())

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

for a in alphabet:
    if a not in S:
        print(a)
        import sys
        sys.exit()

print('None')

Submission status: Accepted

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

found = False
for chr in s:
    if chr in alpha:
        del alpha[alpha.index(chr)]

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

Submission status: Accepted

Solution code:
lis = ["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"]
n = input()
for s in lis:
    if s in n:
        pass
    else:
        ans = s
        break
    if s == "z":
        ans = "None"
print(ans)

Submission status: Accepted

Solution code:
sList = sorted(list(set(list(input()))))
chI = ord('a')
for i in sList:
  if chI == ord(i):
    chI += 1
  else:
    print(chr(chI))
    exit(0)
if len(sList) != 26:
  print(chr(chI))
else:
  print("None")

Submission status: Accepted

Solution code:
s = input()
alpha = [False]*26
ans = "None"

for c in s:
    alpha[ord(c)-ord("a")] = True

for i in range(26):
    if alpha[i] == False:
        ans = chr(ord("a")+i)
        break

print(ans)

Submission status: Accepted

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

for c in alpha:
    if s.count(c) == 0:
        ans = c
        break

print(ans)

Submission status: Accepted

Solution code:
s = input()
l = len(s)
al = [chr(ord('a') + i) for i in range(26)]
a = 0
ans = "None"
for j in al :
    for i in range(l) :
        if s[i] == j :
            a +=1
    if a == 0 :
        ans = j
        break
    a = 0
print(ans)

Submission status: Accepted

Solution code:
## 以下だめだった。
S = list(input())

# 重要：アルファベットの配列を生成
alphabets = [chr(ord('a') + i) for i in range(26)]

# 除外文字を配列に入れる
excludeS = []
flag = True
for i in range(len(alphabets)):
    if alphabets[i] not in S and all(97<=ord(elem)<=122 for elem in S):
        excludeS.append(alphabets[i])
        flag = False

if flag:
    print('None')
else:
    # 辞書順に並び変えて一番小さい文字を求める
    sortedExcludeS = sorted(excludeS)
    print(sortedExcludeS[0])

# ## これが正答
# S = list(input())
 
# flg = True

# #aからzに対応する
# for i in range(ord('a'), ord('z') + 1):
#     # chr(i)に対応するアルファベットの個数がS内で0だった場合の処理
#     if S.count(chr(i)) == 0:
#         flg = False
#         ans = chr(i)
#         break
 
# print("None" if flg else ans)

Submission status: Accepted

Solution code:
S = list(input())

flg = True

for i in range(ord('a'), ord('z') + 1):
    if S.count(chr(i)) == 0:
        flg = False
        ans = chr(i)
        break

print("None" if flg else ans)

Submission status: Accepted

Solution code:
S =  list(input())
S.sort()
S = set(S)
alphabet = list("abcdefghijklmnopqrstuvwxyz")

for i in alphabet:
    if i in S:
      if i == "z":
        print("None")
      else:
          pass
    elif i not in S:
        print(i)
        break

Submission status: Accepted

Solution code:


import numpy as np

s=input()

for i in range(26):
    k=chr(ord('a') + i)
    #print(k)
    if(not k in s):
        print(k)
        exit(0)

print("None")

Submission status: Accepted

Solution code:
S = input()

# アルファベットに対応するからのbucketを作成する
bucket = [False for _ in range(26)]

for i in S:
    bucket[ord(i)-ord('a')] = True

false_idx = -1

for i in range(26):
    if bucket[i] == False:
        false_idx = i
        break

#すべてFalseだった場合
if false_idx == -1:
    print('None')
else:
    print(chr(ord('a')+i))

Submission status: Accepted

Solution code:
S = set(input())
candidates = set('abcdefghijklmnopqrstuvwxyz')

if len(S) == 26:
    print('None')
else:
    print(sorted(list(candidates.difference(S)))[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input = input()

arr = {}

for i in range(ord('a'), ord('z') + 1):
	arr[i] = 0;

for s in input:
	arr[ord(s)] = 1

flag = True
for i in arr:
	if arr[i] == 0:
		print(chr(i))
		flag = False
		break
	
if flag:
	print('None')

Submission status: Accepted

Solution code:
import re

S=input()

char = [chr(i) for i in range(97, 97+26)]
ans = ""

for c in char:
  result = re.findall(c, S, re.S)

  if len(result) == 0:
    ans = c
    break
else:
  ans = "None"

print(ans)

Submission status: Accepted

Solution code:
s = list(input())

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

diff = list(set(s) ^ set(ref))
diff.sort()

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

Submission status: Accepted

Solution code:
s=input()
lis=["q","w","e","r","t","y","u","i","o","p","l","k","j","h","g","f","d","s","a","z","x","c","v","b","n","m"]
a=set()
for i in range(len(s)):
    a.add(s[i])
#print(a)
ans=[]
for i in range(len(lis)):
    if lis[i] in a:
        continue
    ans.append(lis[i])
ans.sort()
if ans:
    print(ans[0])
else:
    print("None")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
_s = [a for a in s]
ss = set(_s)

_az = [chr(i) for i in range(ord('a'), ord('z')+1)]
az = set(_az)

diff = list(az - ss)
diff.sort()

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

S = input()

for c in ascii_lowercase:
	if c not in S:
		print(c)
		break
else:
	print("None")

Submission status: Accepted

Solution code:
#071 b-not found
#A~ 65 65+26 a~97 97+26
s=input()
a=[chr(i) for i in range(97,97+26)]
flag=False
for i in range(26):
    if a[i] not in s:
        ans=i
        flag=True
    if flag:
        break
if flag:
    print(chr(97+i))
else:
    print("None")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
S = input().rstrip()
al = [chr(i) for i in range(97, 97+26)]
for i in al:
    if i not in S:
        print(i)
        sys.exit()
print("None")

Submission status: Accepted

Solution code:
S = input()
X = [chr(i) for i in range(ord('a'), ord('z')+1)]

ans = ''
for x in X:
    if x not in S:
        ans = x
        break
if ans:
    print(ans[0])
else:
    print('None')

Submission status: Accepted

Solution code:
S = input()
X = [chr(i) for i in range(ord('a'), ord('z')+1)]

ans = ''
for x in X:
    if x not in S:
        ans = x
        break
if ans:
    print(ans)
else:
    print('None')

Submission status: Accepted

Solution code:
S = 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 = ''
for x in X:
    if x not in S:
        ans = x
        break
if ans:
    print(ans[0])
else:
    print('None')

Submission status: Accepted

Solution code:
S = 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 = ''
for x in X:
    if x not in S:
        ans = x
        break

if ans == '':
    ans = 'None'
print(ans)

Submission status: Accepted

Solution code:
s = input()
all_lst = [chr(ord('a') + i) for i in range(26)]
if len(set(s)) == 26:
    print('None')
else:
    diff = set(all_lst) - set(s)
    print(sorted(diff)[0])

Submission status: Accepted

Solution code:
alphabet = "abcdefghijklmnopqrstuvwxyz"
str = input()
dic = {}
for i in range(len(str)):
  if not str[i] in dic:
    dic[str[i]] = True
if len(dic) == 26:
  print("None")
else:
  for i in range(len(alphabet)):
    if alphabet[i] not in dic:
      print(alphabet[i])
      break

Submission status: Accepted

Solution code:
s = input()

res = "abcdefghijklmnopqrstuvwxyz"

for i in range(len(s)):
    res = res.replace(s[i], "")
if len(res) == 0:
    print("None")
else:
    print(res[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(set(list(input())))
S.sort()
al = 'abcdefghijklmnopqrstuvwxyz'
if len(S)==26:
  ans = 'None'
else:
  for i in range(len(S)):
    if al[i] != S[i]:
      ans = al[i]
      break
    else:
      ans = al[len(S)]
print(ans)

Submission status: Accepted

Solution code:
import sys


def solve(inp):
    S = inp.readline()

    alphas = {}
    for c in S:
        if c not in alphas:
            alphas[ord(c)] = 0
        alphas[ord(c)] += 1

    for c in range(ord('a'), ord('z') + 1):
        if c not in alphas:
            return chr(c)

    return "None"


def main():
    result = solve(sys.stdin)
    if result:
        print(result)


if __name__ == '__main__':
    main()