Problem:


Score : 100 points

Problem Statement

There is a grid with H rows and W columns.

The square at the i-th row and j-th column contains a string S_{i,j} of length 5.

The rows are labeled with the numbers from 1 through H, and the columns are labeled with the uppercase English letters from A through the W-th letter of the alphabet.

Exactly one of the squares in the grid contains the string snuke. Find this square and report its location.

For example, the square at the 6-th row and 8-th column should be reported as H6.

Constraints

1≦H, W≦26

The length of S_{i,j} is 5.

S_{i,j} consists of lowercase English letters (a-z).

Exactly one of the given strings is equal to snuke.

Input

The input is given from Standard Input in the following format:

H W
S_{1,1} S_{1,2} ... S_{1,W}
S_{2,1} S_{2,2} ... S_{2,W}
:
S_{H,1} S_{H,2} ... S_{H,W}

Output

Print the labels of the row and the column of the square containing the string snuke, with no space inbetween.

Sample Input 1

15 10
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snuke snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake

Sample Output 1

H6

Sample Input 2

1 1
snuke

Sample Output 2

A1



Sample input:
15 10
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snuke snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake


Sample output:
H6

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
s = [list(input().split()) for _ in range(h)]
for i in range(h):
    for j in range(w):
        if s[i][j] == "snuke":
            print(chr(65 + j) + str(i + 1))
            exit()

Submission status: Accepted

Solution code:
h,w=map(int,input().split())
ha=0
wa=0
for i in range(h):
  s=list(map(str,input().split()))
  for j in range(w):
    if s[j]=="snuke":
      wa=j
      ha=i+1
      break
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"]
print(ans[wa]+str(ha))

Submission status: Accepted

Solution code:
def main():
    H, W = map(int, input().split())
    masu = [input().split() for i in range(H)]
    alpha = "abcdefghijklmnopqrstuvwxyz"

    for i in range(H):
        for j in range(W):
            if masu[i][j] == "snuke":
                print(alpha[j].upper() + str(i+1))
                exit()

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from string import ascii_uppercase
h,w = map(int,input().split())
a,b = "",0
for i in range(h):
    s = list(map(str,input().split()))
    for j in range(w):
        if s[j] == "snuke":
            b = ascii_uppercase[j]
            a = i+1
print(b+str(a))

Submission status: Accepted

Solution code:
h,w = map(int, input().split())

for i in range(h):
  s = input().split()
  for j in range(w):
    if s[j] == "snuke":
      col = chr(65+j)
      print(col+str(i+1))
      exit()

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
ans = ''
for i in range(h):
  s = list(map(str, input().split()))
  if 'snuke' in s:
    ans += str(i + 1)
    a = s.index('snuke') + 1
    abc = {1: 'A', 2: 'B', 3: 'C', 4: 'D', 5: 'E', 6: 'F', 7: 'G', 8: 'H', 9: 'I', 10: 'J', 11: 'K', 12: 'L', 13: 'M', 14: 'N', 15: 'O', 16: 'P', 17: 'Q', 18: 'R', 19: 'S', 20: 'T', 21: 'U', 22: 'V', 23: 'W', 24: 'X', 25: 'Y', 26: 'Z'}
    ans = abc[a] + ans
print(ans)

Submission status: Accepted

Solution code:
h,w = map(int, input().split())

li = [list(input().split()) for _ in range(h)]

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

for i in range(h):
    for j in range(w):
        if li[i][j] == 'snuke':
            print(alpha[j] + str(i+1))

Submission status: Accepted

Solution code:
# li = list(map(int, input().split()))
n, m = map(int, input().split())
matr = []
for i in range(n):
	matr.append(list(input().split()))
for i in range(n):
	for j in range(m):
		if matr[i][j] == "snuke":
			print(chr(ord('A')+j)+str(i+1))
			break
# print(chr(ord('A')+ind[1])+str(ind[0]))

Submission status: Accepted

Solution code:
h,w=map(int,input().split())

mat=[input().split() for l in range(h)]

col=ord('A')

i=0
while i<h:

    j=0
    while j<w:
        
        if mat[i][j] == 'snuke':
            print(chr(col+j)+str(i+1))
            break

        j+=1

    i+=1

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
S = [input().split() for _ in range(H)]

for i in range(H):
    for j in range(W):
        if S[i][j] == 'snuke':
            print(chr(65 + j) + str(i + 1))
            break
    else:
        continue
    break

Submission status: Accepted

Solution code:
h,w = map(int,input().split())

a = [list(map(str,input().split())) for _ in range(h)]

for i in range(h):
    for j in range(w):
        if a[i][j] == 'snuke':
            print(chr(j+65)+str(i+1))
            exit()

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
S = [None for _ in range(H)]
for i in range(H):
  S[i] = list(input().split())
for i in range(H):
  for j in range(W):
    if S[i][j] == 'snuke':
      print(chr(ord('A')+j)+str(i+1))
      exit()

Submission status: Accepted

Solution code:
H, W = map(int, input().split())

table = [[] for _ in range(H)]

for y in range(H):
    table[y] = input().split()

for y in range(H):
    for x in range(W):
        if table[y][x] == "snuke":
            print(chr(ord("A") + x) + str(y+1))

Submission status: Accepted

Solution code:
def main():
    h, w = list(map(int, input().split()))
    for i in range(1, h + 1):
        S = input().split()
        for j, s in enumerate(S):
            if s == 'snuke':
                print(''.join([chr(j + 65), str(i)]))
                break


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
l = [input().split() for _ in range(h)]
for b, i in enumerate(l, 1):
    if "snuke" in i:
        print(chr(65 + i.index("snuke"))+str(b))

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(str, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
#from decimal import *

H, W = MAP()

S = [LIST() for _ in range(H)]

for i in range(H):
	for j in range(W):
		if S[i][j] == "snuke":
			print(ascii_uppercase[j], i+1, sep="")
			exit()

Submission status: Accepted

Solution code:
def resolve():
    H, W = map(int, input().split())
    S = []
    abs = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    for i in range(H):
        s = list(input().split())
        S.append(s)
    for p in range(H):
        for q in range(W):
            if S[p][q] == "snuke":
                print(abs[q]+str(p+1))
resolve()

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
S = [list(input().split()) for _ in range(H)]

for h in range(H):
    for w in range(W):
        if S[h][w] == 'snuke':
            sw = chr(ord('A') + w)
            sh = str(h+1)
            print(sw+sh)

Submission status: Accepted

Solution code:
import sys,bisect,string,math,time,functools,random,fractions
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
from itertools import permutations,combinations,groupby
rep=range
def Golf():n,*t=map(int,open(0).read().split())
def I():return int(input())
def S_():return input()
def IS():return input().split()
def LS():return [i for i in input().split()]
def MI():return map(int,input().split())
def LI():return [int(i) for i in input().split()]
def LI_():return [int(i)-1 for i in input().split()]
def NI(n):return [int(input()) for i in range(n)]
def NI_(n):return [int(input())-1 for i in range(n)]
def StoLI():return [ord(i)-97 for i in input()]
def ItoS(n):return chr(n+97)
def LtoS(ls):return ''.join([chr(i+97) for i in ls])
def RA():return map(int,open(0).read().split())
def GI(V,E,ls=None,Directed=False,index=1):
    org_inp=[];g=[[] for i in range(V)]
    FromStdin=True if ls==None else False
    for i in range(E):
        if FromStdin:
            inp=LI()
            org_inp.append(inp)
        else:
            inp=ls[i]
        if len(inp)==2:
            a,b=inp;c=1
        else:
            a,b,c=inp
        if index==1:a-=1;b-=1
        aa=(a,c);bb=(b,c);g[a].append(bb)
        if not Directed:g[b].append(aa)
    return g,org_inp
def GGI(h,w,search=None,replacement_of_found='.',mp_def={'#':1,'.':0},boundary=1):
    #h,w,g,sg=GGI(h,w,search=['S','G'],replacement_of_found='.',mp_def={'#':1,'.':0},boundary=1) # sample usage
    mp=[boundary]*(w+2);found={}
    for i in range(h):
        s=input()
        for char in search:
            if char in s:
                found[char]=((i+1)*(w+2)+s.index(char)+1)
                mp_def[char]=mp_def[replacement_of_found]
        mp+=[boundary]+[mp_def[j] for j in s]+[boundary]
    mp+=[boundary]*(w+2)
    return h+2,w+2,mp,found
def TI(n):return GI(n,n-1)
def accum(ls):
    rt=[0]
    for i in ls:rt+=[rt[-1]+i]
    return rt
def bit_combination(n,base=2):
    rt=[]
    for tb in range(base**n):s=[tb//(base**bt)%base for bt in range(n)];rt+=[s]
    return rt
def gcd(x,y):
    if y==0:return x
    if x%y==0:return y
    while x%y!=0:x,y=y,x%y
    return y
def show(*inp,end='\n'):
    if show_flg:print(*inp,end=end)
 
YN=['YES','NO'];Yn=['Yes','No']
mo=10**9+7
inf=float('inf')
FourNb=[(-1,0),(1,0),(0,1),(0,-1)];EightNb=[(-1,0),(1,0),(0,1),(0,-1),(1,1),(-1,-1),(1,-1),(-1,1)];compas=dict(zip('WENS',FourNb));cursol=dict(zip('LRUD',FourNb))
l_alp=string.ascii_lowercase
#sys.setrecursionlimit(10**7)
read=sys.stdin.buffer.read
readline=sys.stdin.buffer.readline
input=lambda: sys.stdin.readline().rstrip()

class Tree:
    def __init__(self,inp_size=None,ls=None,init=True,index=1):
        self.LCA_init_stat=False
        self.ETtable=[]
        if init:
            if ls==None:
                self.stdin(inp_size,index=index)
            else:
                self.size=len(ls)+1
                self.edges,_=GI(self.size,self.size-1,ls,index=index)
        return
 
    def stdin(self,inp_size=None,index=1):
        if inp_size==None:
            self.size=int(input())
        else:
            self.size=inp_size
        self.edges,_=GI(self.size,self.size-1,index=index)
        return
    
    def listin(self,ls,index=0):
        self.size=len(ls)+1
        self.edges,_=GI(self.size,self.size-1,ls,index=index)
        return
 
    def dfs(self,x,func=lambda pr,prv,nx,dist:prv+dist,root_v=0):
        q=deque([x])
        v=[None]*self.size
        v[x]=root_v
        while q:
            c=q.pop()
            for nb,d in self.edges[c]:
                if v[nb]==None:
                    q.append(nb)
                    v[nb]=func(c,v[c],nb,d)
        return v
 
    def bfs(self,x,func=lambda pr,prv,nx,dist:prv+dist,root_v=0):
        q=deque([x])
        v=[None]*self.size
        v[x]=root_v
        while q:
            c=q.popleft()
            for nb,d in self.edges[c]:
                if v[nb]==None:
                    q.append(nb)
                    v[nb]=func(c,v[c],nb,d)
        return v
 
    def parent(self,x):
        return self.dfs(0,func=lambda pr,prv,nx,dist:pr,root_v=-1)
 
    def topological_sort(self,x):  # return topological sort of the tree
        tps=[]
        q=deque([x])
        v=[None]*self.size
        v[x]=0
        while q:
            c=q.popleft()
            tps.append(c)
            for nb,d in self.edges[c]:
                if v[nb]==None:
                    q.append(nb)
                    v[nb]=0
        return tps
 
    def EulerTour(self,x):
        q=deque()
        q.append(x)
        self.depth=[None]*self.size
        self.depth[x]=0
        self.ETtable=[]
        self.ETdepth=[]
        self.ETin=[-1]*self.size
        self.ETout=[-1]*self.size
        cnt=0
        while q:
            c=q.pop()
            if c<0:
                ce=~c
            else:
                ce=c
                for nb,d in self.edges[ce]:
                    if self.depth[nb]==None:
                        q.append(~ce)
                        q.append(nb)
                        self.depth[nb]=self.depth[ce]+1
            self.ETtable.append(ce)
            self.ETdepth.append(self.depth[ce])
            if self.ETin[ce]==-1:
                self.ETin[ce]=cnt
            else:
                self.ETout[ce]=cnt
            cnt+=1
        return
    
    def LCA_init(self,root):
        self.EulerTour(root)
        self.st=SparseTable(self.ETdepth,init_func=min,init_idl=inf)
        #self.st=SegTree(self.size*2-1,self.ETdepth,function=min,ide=inf)
        self.LCA_init_stat=True
        return
    
    def LCA(self,root,x,y):
        if self.LCA_init_stat==False:
            self.LCA_init(root)
        xin,xout=self.ETin[x],self.ETout[x]
        yin,yout=self.ETin[y],self.ETout[y]
        a=min(xin,yin)
        b=max(xout,yout,xin,yin)
        id_of_min_dep_in_et=self.st.query_id(a,b+1)
        return self.ETtable[id_of_min_dep_in_et]
 
    def __str__(self):
        return  str(self.edges)
 
    def show(self):
        if all([all([d==1 for nd,d in edge]) for edge in self.edges]):
            print( [[nd for nd,d in edge] for edge in self.edges] )
        else:
            print(self)
 
class SparseTable: # O(N log N) for init, O(1) for query(l,r)
    def __init__(self,ls,init_func=min,init_idl=float('inf')):
        self.func=init_func
        self.idl=init_idl
        self.size=len(ls)
        self.N0=self.size.bit_length()
        self.table=[ls[:]]
        self.index=[list(range(self.size))]
        self.lg=[0]*(self.size+1)
        
        for i in range(2,self.size+1):
            self.lg[i]=self.lg[i>>1]+1
 
        for i in range(self.N0):
            tmp=[self.func(self.table[i][j],self.table[i][min(j+(1<<i),self.size-1)]) for j in range(self.size)]
            tmp_id=[self.index[i][j] if self.table[i][j]==self.func(self.table[i][j],self.table[i][min(j+(1<<i),self.size-1)]) else self.index[i][min(j+(1<<i),self.size-1)] for j in range(self.size)]
            self.table+=[tmp]
            self.index+=[tmp_id]
    
    # return func of [l,r)
    def query(self,l,r):
        if r>self.size:r=self.size
        #N=(r-l).bit_length()-1
        N=self.lg[r-l]
        return self.func(self.table[N][l],self.table[N][max(0,r-(1<<N))])
    
    # return index of which val[i] = func of v among [l,r)
    def query_id(self,l,r):
        if r>self.size:r=self.size
        #N=(r-l).bit_length()-1
        N=self.lg[r-l]
        a,b=self.index[N][l],self.index[N][max(0,r-(1<<N))]
        if self.table[0][a]==self.func(self.table[N][l],self.table[N][max(0,r-(1<<N))]):
            b=a
        return b
    
    # return boundary index of r such that func({table[i]} =< x , i in [pos,r]
    def right_bound(self,pos,x):
        k=(self.size-pos).bit_length()
        for j in range(k)[::-1]:
            nx=pos+(1<<j)
            if nx<n and self.query(pos,nx+1)<=x:
                pos+=(1<<j)
        return pos
    
    # return boundary index of l such that func({table[i]} =< x , i in [l,pos]
    def left_bound(self,pos,x):
        k=pos.bit_length()
        for j in range(k)[::-1]:
            nx=pos-(1<<j)
            if 0<=nx and self.query(nx,pos+1)<=x:
                pos-=(1<<j)
        return pos
 
    def __str__(self):
        return str(self.table[0])
 
    def print(self):
        for i in self.table:
            print(*i)
 
show_flg=False
show_flg=True
ans=0


n,m=LI()
for i in rep(n):
    s=input().split()
    for j in rep(m):
        if s[j]=='snuke':
            ans=string.ascii_uppercase[j]+str(i+1)


print(ans)

Submission status: Accepted

Solution code:
h,w=map(int,input().split())
S = [list(map(str, input().split())) for _ in range(h)]
for i in range(h):
    for j in range(w):
        if S[i][j]=="snuke":
            a=i+1
            b=j+1
            break
b=chr(65+b-1)
ans=b+str(a)
print(ans)

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]
def main():
#    N = int(input())
    H, W = map(int,input().split())
#    S = input()
    G = [input().split() for k in range(H)]
    S = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    for k in range(H):
        for l in range(W):
            if G[k][l] == "snuke":
                print(S[l]+str(k+1))
                exit(0)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
S = [input().split() for _ in range(H)]
for r, row in enumerate(S):
    for c, s in enumerate(row):
        if s == "snuke":
            print(chr(ord('A') + c) + str(r + 1))
            exit()

Submission status: Accepted

Solution code:
h,w = map(int,input().split())
l = [list(map(str,input().split())) for i in range(h)]
m = [chr(i) for i in range(ord('A'),ord('Z'))]

for i in range(h):
    for j in range(w):
        if l[i][j] == 'snuke':
            print(m[j] + str(i + 1))
            break

Submission status: Accepted

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()

#####Shorten#####
def DD(arg): return defaultdict(arg)


#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr

#####MakeDivisors######
def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors

#####MakePrimes######
def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum

#####GCD#####
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count

#####ChangeBase#####
def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))

#####IntLog#####
def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count

#############
# Main Code #
#############
H,W = IL()
D = SLL(H)

for i in range(H):
  for j in range(W):
    if D[i][j] == "snuke":
      print(chr(97 + j).upper()+str(i+1))
      exit()

Submission status: Accepted

Solution code:
h, w = map(int,input().split())
li = [input().split() for i in range(h)]

for i in range(h):
    for j in range(w):
        if li[i][j] == "snuke":
            print(chr(j+65)+str(i+1))
            exit()

Submission status: Accepted

Solution code:
# region header
import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**6)
INF = float('inf')
MOD = 10 ** 9 + 7
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rf(): return float(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]
def rf_(): return [float(_) for _ in rs().split()]
def divisors(n, sortedresult=True):
    div = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            div.append(i)
            if i != n // i:
                div.append(n//i)
    if sortedresult:
        div.sort()
    return div
# endregion
H, W = ri_()
S = [rs_() for _ in range(H)]
for i in range(H):
    for j in range(W):
        if S[i][j] == 'snuke':
            print('ABCDEFGHIJKLMNOPQRSTUVWXYZ'[j] + str(i + 1))

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    H, W = map(int, readline().split())
    alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    for i in range(H):
        S = readline().decode('utf-8').strip().split()
        for j in range(W):
            if S[j]=='snuke':
                ans = alphabet[j] + str(i+1)
                print(ans)
                sys.exit()

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
h,w=map(int, input().split( ))
s=[input().split( ) for _ in range(h)]
for i in range(h):
    for j in range(w):
        if s[i][j]=="snuke":
            print(chr(ord("A")+j)+str(i+1))
            exit()

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
A = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans = ""
for i in range(a):
  t = list(input().split())
  if 'snuke' in t:
    ans += A[t.index("snuke")]
    ans += str(i + 1)
print(ans)

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7
ALPHABET = [chr(i) for i in range(ord('A'), ord('Z') + 1)]


def resolve():
    H, W = map(int, input().split())
    S = [list(input().split()) for _ in range(H)]

    for w in range(W):
        for h in range(H):
            if S[h][w] == "snuke":
                break
        else:
            continue
        break

    print(chr(65 + w) + str(h + 1))


if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
import sys
h,w=[int(x) for x in input().rstrip().split()]
l=[]
al=[x for x in "ABCDEFGHIJKLMNOPQRSTUVWXYZ"]
for i in range(h):
  s=[x for x in input().rstrip().split()]
  if "snuke" in s:
    ans=al[s.index("snuke")]+str(i+1)
print(ans)

Submission status: Accepted

Solution code:
h,w = map(int,input().split())
s = [list(input().split()) for nesya in range(h)]
n = 0
for i in range(h):
  for j in range(w):
    if s[i][j] == 'snuke':
      ai = i
      aj = j
      n += 1
      break
  if n == 1:
    break
print(chr(aj+ord('A'))+str(ai+1))

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i in range(1, h + 1):
    row = list(input().split())
    for j in range(w):
        if row[j] == "snuke":
            print(alpha[j] + str(i))
            exit()

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
INF = float("inf")
MOD = 10 ** 9 + 7


def input():
    return sys.stdin.readline().strip()


def main():
    H, W = map(int, input().split())
    S = [input().split() for _ in range(H)]
    for h in range(H):
        for w in range(W):
            if S[h][w] == "snuke":
                ans = chr(ord("A") + w) + str(h + 1)
                print(ans)
                return


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
h,w = map(int,input().split())
C = []
alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i in range(h):
    C.append(list(map(str,input().split())))
for i in range(h):
    if "snuke" in C[i]:
        j = C[i].index("snuke")
        print(alpha[j]+str(i+1))
        break

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
ans_h, ans_w = 0, 0
for i in range(h):
    s = [_ for _ in input().split()]
    for j in enumerate(s):
        if j[1] == 'snuke':
            ans_h, ans_w = i, j[0]
            break

ans = chr(65+ans_w)
ans += str(ans_h+1)
print(ans)

Submission status: Accepted

Solution code:
from sys import stdin
import math
import re
import queue

input = stdin.readline

MOD = 1000000007
INF = 122337203685477580

def solve():
    H,W = map(int, input().split())
    vv = []
    for i in range(H):
        vv.append(list(input().split()))

    for i in range(H):
        for j in range(W):
            if(vv[i][j] == "snuke"):
                print(chr(ord('A') + j),i+1,sep="")


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
S=[input().split() for i in range(H)]
for h in range(H):
    for w in range(W):
        if S[h][w]=="snuke":
            print(chr(w+65)+str(h+1))

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
S=[input().split() for i in range(H)]
columns="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for h in range(H):
    for w in range(W):
        if S[h][w]=="snuke":
            print(columns[w]+str(h+1))

Submission status: Accepted

Solution code:
h, w = map(int, input().split())

al = [chr(i) for i in range(65, 65+26)]


for i in range(h):
    s = input().split()
    for g in range(w):
        if s[g]=="snuke":
            print(al[g]+str(i+1))

Submission status: Accepted

Solution code:
from string import*;_,w,*s=open(0).read().split();a,b=divmod(s.index("snuke"),int(w));print(ascii_uppercase[b]+str(a+1))

Submission status: Accepted

Solution code:
from string import*
h, w, *s = open(0).read().split()
a, b = divmod(s.index("snuke"), int(w))
print(ascii_uppercase[b] + str(a+1))

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
s = [[i for i in input().split()] for i in range(h)]

for i in range(h):
    for j in range(w):
        if s[i][j] == "snuke":
            print("{}{}".format(chr(ord("A") + j), i+1))

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
s = [input().split() for i in range(h)]
for i in range(h):
    for j in range(w):
        if s[i][j]=="snuke":
            print(chr(ord('A')+j)+str(i+1))

Submission status: Accepted

Solution code:
ALF = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
AZ = {i:ALF[i] for i in range(len(ALF))}
H,W = list(map(int,input().split()))
S = [input().split() for _ in range(H)]
for h in range(H):
    for w in range(W):
        if S[h][w] == 'snuke':
            print(AZ[w]+str(h+1))

Submission status: Accepted

Solution code:
h,w = map(int,input().split())
for i in range(h):
  for j,k in enumerate(input().split()):
    if k == 'snuke':
      print(chr(ord('A')+j)+str(i+1))
      exit()

Submission status: Accepted

Solution code:
alpha = {1:'A', 2:'B', 3:'C', 4:'D', 5:'E', 6:'F', 7:'G', 8:'H', 9:'I', 10:'J', 11:'K', 12:'L', 13:'M', 14:'N', 15:'O', 16:'P', 17:'Q', 18:'R', 19:'S', 20:'T', 21:'U', 22:'V', 23:'W', 24:'X', 25:'Y', 26:'Z'}
h, w = map(int, input().split())
for i in range(h):
  a = list(input().split())
  for j in range(w):
    if a[j] == 'snuke':
      ans = alpha[j+1] + str(i+1)
      break
print(ans)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    def main():
        H,W=map(int,input().split())
        grid=[list(map(str,input().split())) for _ in range(H)]

        moji='ABCDEFGHIJKLMNOPQRSTUVWXYZ'

        for i in range(H):
            for j in range(W):
                if grid[i][j]=='snuke':
                    return [moji[j],i+1]
    for i in main():
        print(i, end='')
    print()
resolve()

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    def main():
        h,w=map(int, input().split())
        alphabets=list(chr(ord('A')+i) for i in range(26))
        l=[input().split() for i in range(h)]
        for i in range(h):
            for j in range(w):
                if l[i][j]=='snuke':
                    return alphabets[j]+str(i+1)
    print(main())
resolve()