Harryxun/stf_run huggingface dataset:
/*  ex5_3
    Graku   */
#include<stdio.h>

int main(void) {
    int height, width;
    scanf("%d %d", &height, &width);
    char matrix[height][width];
    for (int row = 0; row < height; ++row) {
        for (int col = 0; col < width; ++col) {
            scanf(" %c", &matrix[row][col]); //don't read "\n"
        }
    }

    int blank_rows[height], blank_cols[width]; //blank -> 0, not blank -> 1
    for (int row = 0; row < height; ++row) { //find blank rows
        int flag = 0;
        for (int col = 0; col < width; ++col) {
            if ('#' == matrix[row][col]) { //not blank
                flag = 1;
                break;
            }
        }
        blank_rows[row] = flag;
    }
    for (int col = 0; col < width; ++col) { //find blank columns
        int flag = 0;
        for (int row = 0; row < height; ++row) {
            if ('#' == matrix[row][col]) { //not blank
                flag = 1;
                break;
            }
        }
        blank_cols[col] = flag;
    }

    for (int row = 0; row < height; row++) {
        if (blank_rows[row]) { //if row is not blank
            for (int col = 0; col < width; ++col) {
                if (blank_cols[col]) { //if column is not blank
                    printf("%c", matrix[row][col]);
                }
            }
            printf("\n");
        }
    }

    return 0;
}

### FIXED CODE ###

height, width = map(int, input().split())
lis = [[0 for i in range(width)] for i in range(height)]
for i in range(height):
    lis[i] = input()

blank_rows = []
for row in range(height):
    if not "#" in lis[row]:
        blank_rows.append(row)

blank_cols = []
for col in range(width):
    flag = 1
    for row in range(height):
        if "#" == lis[row][col]:
            flag = 0
            break
    if flag:
        blank_cols.append(col)

for row in range(height):
    out = ""
    if not row in blank_rows:
        for col in range(width):
            if not col in blank_cols:
                out += lis[row][col]
    if not out == "":
	    print(out)
n,m=map(int,input().split())
st=[]
ch=[]
def mht(ax,ay,bx,by):
  return abs(ax-bx)+abs(ay-by)

for i in range(n):
  st.append(list(map(int,input().split())))
for i in range(m):
  ch.append(list(map(int,input().split())))
  
for i in st:
  ax=i[0]
  ay=i[1]
  mn=100000000
  for (j,k) in zip(ch,range(1,m+1)):
    bx=j[0]
    by=j[1]
    mh=mht(ax,ay,bx,by)
    if mh<mn:
      mn=mh
      nm=k
  print(nm)


### FIXED CODE ###

n,m=map(int,input().split())
st=[]
ch=[]
def mht(ax,ay,bx,by):
  return abs(ax-bx)+abs(ay-by)

for i in range(n):
  st.append(list(map(int,input().split())))
for i in range(m):
  ch.append(list(map(int,input().split())))
  
for i in st:
  ax=i[0]
  ay=i[1]
  mn=1000000000
  for (j,k) in zip(ch,range(len(ch))):
    bx=j[0]
    by=j[1]
    mh=mht(ax,ay,bx,by)
    if mh<mn:
      mn=mh
      nm=k
  print(nm+1)
s = [input().string()]
print('endswith[a, start][e, end]')

### FIXED CODE ###

s = input()
p = input()

s *= 2

if s.find(p) != -1:
    print("Yes")
else:
    print("No")
class Dice:
        def __init__(self):
            self.u=1
        self.w=2
        self.s=3
        self.e=4
        self.n=5
        self.d=6
        self.dic={"W":0,"S":1,"E":2,"N":3}
     
    def __init__(self,u,w,s,e,n,d):
            self.u=u
        self.w=w
        self.s=s
        self.e=e
        self.n=n
        self.d=d
        self.dic={"W":0,"S":1,"E":2,"N":3}
 
    def rot(self,way):
            if isinstance(way,str):
                way=self.dic[way]
 
        if(way==0):
                c=self.u
            self.u=self.e
            self.e=self.d
            self.d=self.w
            self.w=c
        elif way==1:
            c=self.u
            self.u=self.n
            self.n=self.d
            self.d=self.s
            self.s=c
        elif way==2:
            c=self.u
            self.u=self.w
            self.w=self.d
            self.d=self.e
            self.e=c
 
import random
u,s,e,w,n,d=map(int,input().split())
dice=Dice(u,w,s,e,n,d)
u,s,e,w,n,d=map(int,input().split())
dice_b=Dice(u,w,s,e,n,d)
ok=False
for i in range (1000):
        dice.rot(random.randint(0,3))
    if(dice.u==dice_b.u and dice.d==dice_b.d and dice.w==dice_b.w and dice.s==dice_b.s and dice.e==dice_b.e and dice.n==dice_b.n):
            ok=True
if ok:
        print('Yes')
else :
    print('No')


### FIXED CODE ###

import random


def dice ( a , b , c , d , e , f , l ) :
    if l == "N" :
        return [ b , f , c , d , a , e ]
    if l == "S" :
        return [ e , a , c , d , f , b ]
    if l == "E" :
        return [ d , b , a , f , e , c ]
    if l == "W" :
        return [ c , b , f , a , e , d ]
d = list ( map ( int , input ( ).split ( ) ) )
s = [ "W" , "N" , "E" , "S" ]
a , b , c , g , e , f = map ( int , input ( ).split ( ) )
j = 0
while j <= 10000 :
    k = random.randrange ( 4 )
    d = dice ( d [ 0 ] , d [ 1 ] , d [ 2 ] , d [ 3 ] , d [ 4 ] , d [ 5 ] , s [ k ] )
    if d [ 0 ] == a and d [ 1 ] == b and d [ 2 ] == c and d [ 3 ] == g and d [ 4 ] == e and d [ 5 ] == f :
        print ( "Yes" )
        break
    if j == 10000 :
        print ( "No" )
    j += 1
x,y=input().split()
print("<" if x<y else "=" if x==y else">)

### FIXED CODE ###

x,y=input().split()
print("<" if x<y else "=" if x==y else ">")
nums =  list(map(int, input().split()))
 
max_num = max(nums)
min_num = max(nums)
two = [max_num, min_num]
mid_num = list(set(nums) - set(two))
 
two_num = str(max_num) + str(mid_num)
print(int(two_num) + min_num)

### FIXED CODE ###

num = list(map(int, input().split()))
num.sort(reverse=True)
print(num[0] * 10 + num[1] + num[2])
from sys import stdin
import math
import itertools
import re
import sys
sys.setrecursionlimit(10000)
 
 
def makeIntMatrix(lines):
    intMatrix = []
    for a in makeStringMatrix(lines):
        intMatrix.append([int(b) for b in a])
    return intMatrix
 
 
def makeStringMatrix(lines):
    stringMatrix = [line.split() for line in lines]
    return stringMatrix
 
 
def makeInt(line):
    return int(line.rstrip())
 
 
def makeMultiInteger(line):
    return [int(x) for x in line.rstrip().split()]
 
dp = {}
T = {}
 
def solve(input_string):
    S = input_string[1]
    intMatrix = makeIntMatrix(input_string[2:])
    #print(input_string[2:])
    for line in intMatrix:
        L, R = line
        #print(l, r)
        #print(S[l:r+1])
        #cnt = len(re.findall(r'AC', S[l-1:r]))
        D = R - L
        totalCnt = cntAC(R-1, R, D, S, 0)
        print(totalCnt)
    return
 

def cntAC(l, r, D, S, cnt):
    global dp
    global T
    if r-l == D+1:
        return cnt
    if str(l)+str(r) not in T:
        T[str(l)+str(r)] = S[l-1:r]
        t = T[str(l)+str(r)]
    if str(l)+str(r) not in dp:
        #print(t)
        dp[str(l)+str(r)] = len(t.split('AC'))-1
        cnt = dp[str(l)+str(r)]
        return cntAC(l-1, r, D, S, cnt)
    else:
        cnt = dp[str(l)+str(r)]
        return cntAC(l-1, r, D, S, cnt)
 
 
def main():
    input_lines = stdin.readlines()
    answer = solve(input_lines)
    #print(answer)
 
 
if __name__ == '__main__':
    main()


### FIXED CODE ###

N, Q = map(int, input().split())
S = input()
t=[0]*(N+1)
for i in range(N):
  t[i + 1] = t[i] + (1 if S[i : i + 2] == 'AC' else 0)
for i in range(Q):
  l, r = map(int, input().split())
  print(t[r-1] - t[l-1])
n=input()
for i in range(7):
  print(i) if 2**i <= n < 2++(i+1)

### FIXED CODE ###

n=int(input())
for i in range(7):
  if 2**i<=n<2**(i+1):
    print(2**i)
n,k = list(map(int, input().split()))
s = input()
if s[n-1] == '1':
	s += '0'
else:
	s += '1'
c = []

j = 0
for i in range(1, n+1):
	if s[i-1] == s[i]:
		j += 1
	else:
		c.append([s[i-1], j+1])
		j = 0

for i in range(1, len(c)):
	c[i][1] += c[i-1][1]

if 2*k >= 2*len(c):
	print(c[-1][1])
	quit()
else:
	p = 0
	res = 0
	if s[0][0] == '0':
		res = c[1][1] if k == 1 else c[2*k+1][1]
		p += 1
	else:
		res = c[2][1] if k == 1 else c[2*k][1]
		p += 2

	while p+2*k < len(c):
		res = max(res, c[p+2*k][1] - c[p-1][1])
		p += 2

	print(res)
	quit()

### FIXED CODE ###

n,k = list(map(int, input().split()))
s = input()
if (s.find('0') < 0) or (s.find('1') < 0):
	print(len(s))
	quit()
else:
	s += '0' if s[n-1] == '1' else '1'
c = []

j = 0
for i in range(1, n+1):
	if s[i-1] == s[i]:
		j += 1
	else:
		c.append([s[i-1], j+1])
		j = 0

for i in range(1, len(c)):
	c[i][1] += c[i-1][1]

if 2*k >= len(c):
	print(c[-1][1])
	quit()
else:
	p = 0
	res = 0
	if c[0][0] == '0':
		res = c[1][1] if k == 1 else c[2*k-1][1]
		p += 1
	else:
		res = c[2][1] if k == 1 else c[2*k][1]
		p += 2

	while p+2*k < len(c):
		res = max(res, c[p+2*k][1] - c[p-1][1])
		p += 2

	res = max(res, c[-1][1] - c[(len(c)-1) - 2*k][1]) if c[-1][0] == '0' else max(res, c[-1][1] - c[(len(c)-1) - (2*k+1)][1])

	print(res)
	quit()
a=input.sprit()
a=''.join(a)
print(a)

### FIXED CODE ###

List=list(map(str,input().split()))
List.reverse()
print(''.join(List))
A=int(input())
B=int(input())
C=int(input())
K=int(input())
j=0
if A>=(2**K)*B :
    print('No')
else :
    while A>=(2**j)*B :
        j+=1
    if (2**j)*B>=(2**(K-j))*C :
        print('No')
    else:
        print('Yes')

### FIXED CODE ###

x=3
A,B,C=(int(x) for x in input().split())
K=int(input())
j=0
if A>=(2**K)*B :
    print('No')
else :
    while A>=(2**j)*B :
        j+=1
    if (2**j)*B>=(2**(K-j))*C :
        print('No')
    else:
        print('Yes')
n, m, k = map(int, input().split())

candidates = [None] * n
friends = [set() for _ in range(n)]
blocks = [set() for _ in range(n)]
parent = [i for i in range(n)]
dic = {}

def root(x):
    if parent[x] == x:
        return x
    else:
        parent[x] = root(parent[x])
        return parent[x]

def unite(x, y):
    x = root(x)
    y = root(y)
    if x == y:
        return
    parent[x] = y


def group(x):
    global parent
    key = root(parent[x])
    s = set()
    for i in range(n):
        if root(parent[i]) == key:
            s.add(i)
    return s

for _ in range(m):
    a, b = map(int, input().split())
    friends[a - 1].add(b - 1)
    friends[b - 1].add(a - 1)
    unite(a - 1, b - 1)

for _ in range(k):
    c, d = map(int, input().split())
    blocks[c - 1].add(d - 1)
    blocks[d - 1].add(c - 1)

for i in range(n):
    x = root(i)
    s = set()
    if x in dic:
        s = dic[x]
    else:
        s = group(x)
        dic[x] = s
    candidates[i] = str(len(s - friends[i] - blocks[i]) - 1)

print(' '.join(candidates))


### FIXED CODE ###

class UnionFind:
    def __init__(self, n):
        self.parents = [i for i in range(n + 1)]
        self.sizes = [1] * (n + 1)

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

    def unite(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return
        if y < x:
            x, y = y, x
        self.parents[y] = x
        self.sizes[x] += self.sizes[y]

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

    def size(self, x):
        return self.sizes[self.find(x)]


n, m, k = map(int, input().split())
uf = UnionFind(n)
friends = [0] * n
blocks = [0] * n
for i in range(m):
    a, b = map(int, input().split())
    friends[a - 1] += 1
    friends[b - 1] += 1
    uf.unite(a - 1, b - 1)
for i in range(k):
    c, d = map(int, input().split())
    if uf.same(c - 1, d - 1):
        blocks[c - 1] += 1
        blocks[d - 1] += 1
ans = [0] * n
for i in range(n):
    ans[i] = uf.size(i) - friends[i] - blocks[i] - 1
print(*ans)
N, T = map(int, input().split())
for i in range(N):
  c, t = map(int, input().split())
  if t<=T:
    min=min(c, 1001)
print('TLE' if min=1001 else c)

### FIXED CODE ###

N, T = map(int, input().split())

cost = float("inf")
for i in range(N):
    c, t = map(int, input().split())
    if t <= T:
        cost = min(cost, c) 

print("TLE" if cost == float("inf") else cost)
N , K = map(int,input().split())
lst = []
for i in range(K):
    lst.append(input())
start = N
while True:
    for num in str(start):
        if num in lst:
            break
    else:
        break
    start += 1
print(str(start))

### FIXED CODE ###

N , K = map(int,input().split())
lst = input().split()

start = N
while True:
    for num in str(start):
        if num in lst:
            break
    else:
        break
    start += 1
print(str(start))
N, M = map(int, input().split())
bre = []
A = [1] * 10000
A[0] = 0
for i in range(M):
    a = int(input())
    A[a+1] = 0
#print(bre)
for i in range(2, N+2):
    if A[i] == 0:
        continue
    A[i] = A[i-1]+ A[i-2]
    A[i] = A[i] % 1000000007
    #print(A)
print(A[N+1])





### FIXED CODE ###

N, M = map(int, input().split())
A = [0 for i in range(N + 2)]
A[0] = 0
A[1] = 1
for i in range(M):
    a = int(input()) + 1
    A[a] = -1
for i in range(2, N+2):
    if A[i] ==  -1:
        A[i] = 0
    else:
        A[i] = A[i-1]+ A[i-2]
        A[i] = A[i] % 1000000007
    #print(A)
print(A[N + 1])
for i in range(1,int(input())+1):
 a=i
 while(a>0):
  if a%3==0 or a%10==3:
   print(' ',i,end=' ')
   break
  a/=10

### FIXED CODE ###

print('',*[i for i in range(3,int(input())+1)if i%3==0 or'3'in str(i)])
a,b=map(int,input().split())
if a>9:
    print(b)
else:
    print(b+(100＊(10-a))

### FIXED CODE ###

a,b=map(int,input().split())
if a>=10:
    print(b)
else:
    print(b+(100*(10-a)))
N, A, B = map(int, input().split)
print(min(N * A, B))

### FIXED CODE ###

N, A, B = map(int, input().split())
print(min(N * A, B))
n=int(input())
summ=0
for i in range(1,n):
    if i%3!=0 and i%5!=0:
        summ+=i
print(summ)n=int(input())
summ=0
for i in range(1,n):
    if i%3!=0 and i%5!=0:
        summ+=i
print(summ)


### FIXED CODE ###

cnt=0
n=int(input())
for i in range(1,n+1):
    if i%3!=0 and i%5!=0:
        cnt+=i
print(cnt)
from collections import deque,defaultdict
N=int(input())
lst=defaultdict(list)
for i in range(N-1):
  u,v,w=map(int,input().split())
  lst[u].append([v,w])
  lst[v].append([u,w])

def dfs(d,col):
  if len(d)==0:
    return col
  s=d.pop()
  for i in lst[s]:
    v,w=i[0],i[1]
    lst[v].remove([s,w])
    d.append(v)
    if w%2==0:
      if col[u]!=-1:
        col[v]=col[u]
      elif col[v]!=-1:
        col[u]=col[v]
      else:
        col[u]=0
        col[v]=0
    else:
      if col[u]!=-1:
        col[v]=(col[u]+1)%2
      elif col[v]!=-1:
        col[u]=(col[v]+1)%2
      else:
        col[u]=0
        col[v]=1
  return dfs(d,col)

d=deque([1])
col=defaultdict(int)
for i in range(1,N+1):
  if i==1:
    col[i]=0
  else:
    col[i]=-1
ans=dfs(d,col)
for i in range(1,N+1):
  print(ans[i])

### FIXED CODE ###

N=int(input())
E=[[] for _ in range(N)]
for i in range(N-1):
  u,v,w=map(int,input().split())
  u-=1
  v-=1
  E[u].append((v,w))
  E[v].append((u,w))
color=[-1]*N
color[0]=0
stack=[0]
while stack:
  u=stack.pop()
  for v,w in E[u]:
    if color[v]==-1:
      stack.append(v)
      if w%2==0:
        color[v]=color[u]
      else:
        color[v]=1 if color[u]==0 else 0
for i in range(N):
  print(color[i])
import numpy as np
import sys
sys.setrecursionlimit(10 ** 7)

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

S = input()
S = S[::-1]
LS = len(S)

MOD = 10 ** 9 + 7


dp = [[0] * 13 for _ in range(LS+1)]
dp[0][0] = 1

for i in range(LS):
    if S[i] != '?':
        d = int(S[i])
        md = (d * pow(10, i, 13)) % 13

        if md == 0:
            dp[i + 1] = dp[i]
        else:
            dp[i + 1][md:] = dp[i][:-md]
            dp[i + 1][:md] = dp[i][-md:]
    else:
        t = pow(10, i, 13)
        for k in range(10):
            md = (k * t) % 13

            for j in range(13):
                nj = (j + md) % 13
                dp[i + 1][nj] += dp[i][j]
                dp[i + 1][nj] %= MOD

print(dp[LS][5])


### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 7)

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

S = input()
S = S[::-1]
LS = len(S)

MOD = 10 ** 9 + 7


dp = [[0] * 13 for _ in range(LS+1)]
dp[0][0] = 1

for i in range(LS):
    if S[i] != '?':
        d = int(S[i])
        md = (d * pow(10, i, 13)) % 13

        if md == 0:
            dp[i + 1] = dp[i]
        else:
            dp[i + 1][md:] = dp[i][:-md]
            dp[i + 1][:md] = dp[i][-md:]
    else:
        t = pow(10, i, 13)
        for k in range(10):
            md = (k * t) % 13

            for j in range(13):
                nj = (j + md) % 13
                dp[i + 1][nj] += dp[i][j]
                dp[i + 1][nj] %= MOD

print(dp[LS][5])
N = int(input())
sum = eval(input().replace(' ','*'))
print(sum if sum<= 10**18 else -1)

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
A.sort()
res = 1
for i in A:
    res*=i;
    if res>10**18:
        res = -1
        break
print(res)
n = int(input())
A = list(map(int, input().split()))
print(*A[::-2], *A[n%2::2])

### FIXED CODE ###

n=int(input())
A=list(map(int,input().split()))
print(' '.join(map(str, A[::-2])), ' '.join(map(str, A[n%2::2])))
H, W = map(int, input().split())
for _ in range(H):
  	c = input()
    print(c)
    print(c)
    


### FIXED CODE ###

H, W = map(int, input().split())
for _ in range(H):
    s = input()
    print(s)
    print(s)
import bisect
x, n = map(int, input().split())
pN = list(map(int, input().split()))
plus_flag = 1
minus_flag = 1
pN.sort()
key_index = bisect.bisect(pN, x) - 1
plus_index = key_index
minus_index = key_index

if n == 0:
    print(x)
else:
    while(1):
        if minus_index <= 0:
            minus_flag = 0
            
        if minus_flag == 1:
            if pN[minus_index] - 1 != pN[minus_index-1]:
                print(pN[minus_index] - 1)
                break
            else:
                minus_index = minus_index - 1

        

        if plus_index >= n:
                    plus_flag = 0

        if plus_flag == 1:
            if pN[plus_index] + 1 != pN[plus_index+1]:
                print(pN[plus_index] + 1)
                break
            else:
                plus_index = plus_index + 1

### FIXED CODE ###

import bisect
x, n = map(int, input().split())
pN = list(map(int, input().split()))

pN.sort()

diff = 0

if n == 0:
    print(x)
else:
    while(1):
        if x-diff not in pN:
            print(x-diff)
            exit()
        elif x+diff not in pN:
            print(x+diff)
            exit()
        diff+=1
N = list(map(int, input().split()))
A = list(map(int, input().split()))

isApprove = True

for x in A:
    if x % 2 == 0:
        if (x % 3 != 0) or (x % 5 != 0):
            isApprove = False
            break
        
if isApprove:
    print ('APPROVED')
else:
    print('DENIED')


### FIXED CODE ###

i = list(map(int, input().split()))
a = i[0]
b = i[1]
c = i[2]

isPoor = False

if (a == b or a == c) and b != c:
    isPoor = True
elif (b == a or b == c ) and a != c:
    isPoor = True
elif (c == a or c == b) and a != b:
    isPoor = True

if isPoor:
    print('Yes')
else:
    print('No')
n,m=map(int,input().split())
a=[input() for i in range(n)]
b=[input() for i in range(m)]
for i in range(n-m+1):
    for j in range(n-m+1):
        x=[]
        for k in range(m):
            x.append(a[i+k][j+m])
        if x==b:
            print("Yes")
            exit()
print("No")


### FIXED CODE ###

n,m=map(int,input().split())
a=[input() for i in range(n)]
b=[input() for i in range(m)]
for i in range(n-m+1):
    for j in range(n-m+1):
        x=[]
        for k in range(m):
            x.append(a[i+k][j:j+m])
        if x==b:
            print("Yes")
            exit()
print("No")
import collections

n = int(input())
q_list = []
a_list = []
for i in range(n):
    q = []
    x, y = map(int, input().split())
    q.append(x)
    q.append(y)
    q_list.append(q)
    if i != 0:
        for j in range(i):
            difx1 = q_list[j][0] - q_list[i][0]
            dify1 = q_list[j][1] - q_list[i][1]
            difx2 = q_list[i][0] - q_list[j][0]
            dify2 = q_list[i][1] - q_list[j][1]
            a_list.append(f"{difx1}{dify1}")
            a_list.append(f"{difx2}{dify2}")
if n != 1:
    c = collections.Counter(a_list)
    zero = c.most_common()[0][1]
    print(n-zero)
else:
    print(1)

### FIXED CODE ###

from collections import Counter

n = int(input())
q_list = []
a_list = []
for i in range(n):
    q = []
    x, y = map(int, input().split())
    q.append(x)
    q.append(y)
    q_list.append(q)
    if i != 0:
        for j in range(i):
            difx1 = q_list[j][0] - q_list[i][0]
            dify1 = q_list[j][1] - q_list[i][1]
            difx2 = q_list[i][0] - q_list[j][0]
            dify2 = q_list[i][1] - q_list[j][1]
            a_list.append(str(difx1)+str(dify1))
            a_list.append(str(difx2)+str(dify2))
if n != 1:
    zero = Counter(a_list).most_common()[0][1]
    print(n-zero)
else:
    print(1)
import sys

DICT = ['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 = set(DICT)
s = set(list(sys.stdin.readline().strip()))

print(sorted(list(d-s))[0])

### FIXED CODE ###

import sys

DICT = ['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 = set(DICT)
s = set(list(sys.stdin.readline().strip()))

z = sorted(list(d-s))

if len(z) >= 1:
    print(z[0])
else:
    print('None')
import math
from functools import reduce
 
n,m = map(int,input().split())
x = list(map(int,input().split()))
 
x.append(m)
x.sort() 
 
aa = []
for i in range(len(x)-1):
    a = x[i+1] - x[i]
    aa.append(a)
 
def gcd(*numbers):
    return reduce(math.gcd, numbers)

if len(x) == 1:
    print(abs(x[0]-m))
else:
    print(gcd(*set(aa)))

### FIXED CODE ###

n,m = map(int,input().split())
aa = list(map(int,input().split()))
 
bb = [abs(a-m) for a in aa]

def gcd(a,b):
    while b:
        a, b = b, a % b
    return a
    
if len(aa) == 1:
    print(abs(aa[0]-m))
else:
    while len(bb) > 1:
        a, b = bb.pop(), bb.pop()
        bb.append(gcd(a,b))
    print(bb[0])
a,b = map(str,input().split())

if s == b:
  print("H")
else:
  print("D")

### FIXED CODE ###

a,b = map(str,input().split())

if a == b:
  print("H")
else:
  print("D")
N = int(input())
H = list(map(int, input().split()))
max = 0

for i in range(N):
  cnt = 0
  if i != N-1:
    now = i
    while H[now] < H[now+1]:
      now += 1
      cnt += 1
    if max < cnt:
      max = cnt
  cnt = 0
  if i != 0:
    now = i
    while H[now] < H[now-1]:
      now -= 1
      cnt += 1
    if max < cnt:
      max = cnt
print(max)


### FIXED CODE ###

N = int(input())
H = list(map(int, input().split()))
H.reverse()
max = 0
cnt = 0
 
for i in range(N-1):
  if H[i] <= H[i+1]:
    cnt += 1
  else:
    cnt = 0
  if cnt > max:
    max = cnt
if cnt > max:
  max = cnt
print(max)
t = input()
 
ans = replace("?", "D")
print(ans)

### FIXED CODE ###

t = input()
 
ans = t.replace("?", "D")
print(ans)
S = int(input())


def prime_factorize(n):
    while n % 2 == 0:
        n //= 2
    if n <= 10 ** 9:
        return n
    f = 3
    while f * f <= n:
        if n <= 10 ** 9:
            return n
        if n % f == 0:
            n //= f
        else:
            f += 2


x = prime_factorize(S)
y = S // x
print(0, 0, x, 0, 0, y)

### FIXED CODE ###

S = int(input())

if S != 10 ** 18:
    q = S // 10 ** 9 + 1
    r = 10 ** 9 * q - S
else:
    q = S // 10 ** 9
    r = 10 ** 9 * q - S

print(0, 0, q, r, 1, 10 ** 9)
mport math
t = input().split()
t = [int(i) for i in t]
r = math.sqrt(t[0]*t[0]+ t[1]*t[1])
h = t[2]
m = t[3]
if (h == 12):
    h = 0
if (m == 60):
    m = 0
hour_angle = 0.5 * (h * 60 + m) 
minute_angle = 6 * m 
angle = abs(hour_angle - minute_angle) 
angle = min(360 - angle, angle)
print(math.sqrt(r*r - 2*t[0]*t[1]*math.cos(angle(2*math.pi/360))))

### FIXED CODE ###

import math
t = input().split()
t = [int(i) for i in t]
r = math.sqrt(t[0]*t[0]+ t[1]*t[1])
h = t[2]
m = t[3]
if (h == 12):
    h = 0
if (m == 60):
    m = 0
hour_angle = 0.5 * (h * 60 + m) 
minute_angle = 6 * m 
angle = abs(hour_angle - minute_angle) 
angle = min(360 - angle, angle)
print(math.sqrt(r*r - 2*t[0]*t[1]*math.cos(angle*(2*math.pi/360))))