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: Wrong Answer

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rf = lambda: map(float, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

h,w = rm()
for i in range(h):
    a = list(rs())
    for idx, j in enumerate(a):
        if j == 'snuke':
            print(f'{chr(65+i)}{idx+1}')
            exit()

Submission status: Wrong Answer

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
      print(j,ha,wa)
      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: Wrong Answer

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)+str(i))
      exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
h,w=map(int,input().split())
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']
l=[]
for i in range(h):
    a=list(map(str,input().split()))
    l.append(a)
for j in range(h):
    for k in range(w):
        if l[j][k]=='snuke':
            print(str(alp[k])+str(j+1))
print(l)

Submission status: Wrong Answer

Solution code:
h,w=map(int,input().split())
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']
l=[]
for i in range(h):
    a=list(map(str,input().split()))
    l.append(a)
for j in range(h):
    for k in range(w):
        if l[j][k]=='snuke':
            print(str(alp[j])+str(k+1))
print(l)

Submission status: Wrong Answer

Solution code:
h,w=map(int,input().split())
A=[input().split() for _ in range(h)]
for a in range(h):
  for b in range(w):
    if A[a][b]=="snuke":
      print("{}{}".format(a+1,chr(ord("A")+b)))
      break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

A = []
t = 0
u = 0
for i in range(h):
    s = list(input().split())
    # t  = s.index("snuke")
    if s.count("snuke") >= 1:
        t = s.index("snuke")
        print(t)
        u = i
        break

print(chr(ord('A') + t) + str(u+1))

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
S = [input() for _ in range(H)]
for i in range(H):
  for j in range(W):
    if S[i][j] == "snuke":
      print("{}{}".format(alpha[j], i+1))

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
S = [input() for _ in range(H)]
for i in range(H):
  for j in range(W):
    if S[i][j] == "snuke":
      print("{}{}".format(i+1, alpha[j]))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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(ord('A')+j) +str(i))
      break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
H, W = map(int, input().split())
S = [list(input()) for _ in range(H)]
for x in range(H):
  for y in range(W):
    if S[x][y] == "snuke":
      print(alpha[y], end="")
      print(x+1)

Submission status: Wrong Answer

Solution code:
alpha = "abcdefghijklmnopqrstuvwxyz"
H, W = map(int, input().split())
S = [list(input()) for _ in range(H)]
for x in range(H):
  for y in range(W):
    if S[x][y] == "snuke":
      print(alpha[y], end="")
      print(x+1)

Submission status: Wrong Answer

Solution code:
alpha = "abcdefghijklmnopqrstuvwxyz"
H, W = map(int, input().split())
S = [list(input()) for _ in range(H)]
for x in range(H):
  for y in range(W):
    if S[x][y] == "snuke":
      print(alpha[y], end="")
      print(x)

Submission status: Wrong Answer

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

for i in range(1,H+1):
    Si=list(input().split())
    print(Si)
    if 'snuke' in Si:
        j=Si.index('snuke')
        print(chr(ord('A')+j)+str(i))
        break

Submission status: Wrong Answer

Solution code:
h,w=map(int,input().split())
S=[]
ans=0
ans1=0
W=['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(h):
  S.append(input().split())
for k in range(h):
  for j in range(w):
    if S[k][j]=='snuke':
      ans=j
      ans1=str(k)
print(W[ans]+ans1)

Submission status: Wrong Answer

Solution code:
abc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
H, W = map(int, input().split())
S = [[] for i 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(abc[j] + str(i))
            break

Submission status: Wrong Answer

Solution code:
abc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
H, W = map(int, input().split())
S = [[] for i 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(abc[j] + str(i))
            break

Submission status: Wrong Answer

Solution code:
from numpy import*;H,_=input().split();i,j=where(array([input().split()for _ in range(int(H))])=="snuke");print(chr(*j+65)+str(i*+1))

Submission status: Wrong Answer

Solution code:
from numpy import*;H,_=input().split();i,j=where(array([input().split()for _ in range(int(H))])=="snuke");print(chr(*j+65)+"123456789ABCDEFGH"[i[0]])

Submission status: Wrong Answer

Solution code:
h,w=map(int,input().split())
disp=['A','B','C','D','E','F','G','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
for i in range(h):
  arr=list(map(str,input().split()))
  for j in range(w):
    if arr[j]=='snuke':
      print(disp[j]+str(i+1))

Submission status: Wrong Answer

Solution code:
h,w=map(int,input().split())
disp=['A','B','C','D','E','F','G','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
for i in range(1,h+1):
  arr=list(map(str,input().split()))
  for j in range(w):
    if arr[j]=='snuke':
      print(disp[j]+str(i))

Submission status: Wrong Answer

Solution code:
#coding: utf-8
H, W = map(int, input().split())
table = []
for _ in range(H):
    table.append(list(input().split()))
alp = [chr(i) for i in range(65, 65+26)]
for i in range(H):
    for j in range(W):
        if table[i][j] == "snuke":
            print(alp[j] + str(i))
            break

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
L = []
A = ['A','B','C','D','E','F','G','H','I','J','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
for i in range(H):
  L.append(input().split())
for i in range(H):
  for j in range(W):
    if L[i][j] == 'snuke':
      k = i+1
      l = A[j]
      break
print(l+str(k))

Submission status: Wrong Answer

Solution code:

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



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

for i in range(H):
    for j in range(W):
        if S[i][j]=="snuke":
            print(itoa(j).upper()+str(i+1))
        break

Submission status: Wrong Answer

Solution code:

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



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

for i in range(H):
    for j in range(W):
        if S[i][j]=="snuke":
            print(itoa(j).upper()+str(i))
        break

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
L = [list(map(str,input().split())) for i in range(H)]
A = [chr(i) for i in range(ord("A"),ord("Z")+1)]
for y in range(H) :
    for x in range(W) :
        if L[y][x] == "snuke" :
            ans = A[y]+str(x+1)
            print(ans)
            exit()

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
A = [list(input().split()) for i in range(H)]
for j in range(H):
  for k in range(W):
    if (A[j][k] == 'snuke'):
      break
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']
print(L[k-1]+str(j))

Submission status: Wrong Answer

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

def findSnuke():
    H, W = map(int, input().split())
    alphabet = "ABCDEFGHIJKLMNOPQRSTU"
    for i in range(H):
        row = input().split()
        for j in range(W):
            if row[j] == "snuke":
                return alphabet[i] + str(j+1)

print(findSnuke())

Submission status: Wrong Answer

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

H, W = map(int, input().split())

alphabet = "ABCDEFGHIJKLMNOPQRSTU"

for i in range(H):
    row = input().split()
    for j in range(W):
        if row[j] == "snuke":
            print(alphabet[j] + str(i))
            break

Submission status: Wrong Answer

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

for i in range(H):
    S = list(input().split())
    for j in range(W):
        if S[j] == "snuke":
            res = ""
            res += chr(ord('A') + j)
            res += chr(ord('0') + i + 1)
            print(res)

Submission status: Wrong Answer

Solution code:
from string import ascii_uppercase
H, W = [int(i) for i in 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("{}{}".format(ascii_uppercase[w], h))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    h, w = map(int, input().split())
    s_list = [list(input().split()) for _ in range(h)]

    for r in range(h):
        for c in range(w):
            if s_list[r][c] == "snuke":
                print(chr(ord("A") + c) + str(r + 1))
                break


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
h,w = map(int,input().split())
l = [list(input().split()) for i in range(h)]
for i in range(h):
    for j in range(w):
        if l[i][j] == "snuke":
            x = chr(ord("A")+j)
            print("{}{}".format(x,i+1))

Submission status: Accepted

Solution code:
# coding: utf-8
h, w = map(int,input().split())
alp=[chr(i) for i in range(65, 65+26)]
for i in range(h):
    l=list(map(str,input().split()))
    if "snuke" in l:
        print(alp[l.index("snuke")]+str(i+1))
        break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
for i in range(H):
  try:
    print(f"{chr(ord('A')+input().split().index('snuke'))}{i+1}")
    exit()
  except:
    pass

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
flag = False
for i in range(H):
    S = list(input().split())
    for j, s in enumerate(S):
        if s == "snuke":
            print(chr(ord('A')+j)+str(i+1))
            flag = True
            break

    if flag:
        break

Submission status: Accepted

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

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":
            l = chr(ord("A") + j)
            print(l + str(i + 1))
            exit()

Submission status: Accepted

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

for i in range(h):
    S = list(input().split())
    s.append(S)

for i in range(h):
    for j in range(w):
        if s[i][j] == "snuke":
            l = chr(ord("A") + j)
            print(l + str(i + 1))
            exit()

Submission status: Accepted

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

for i in range(h):
    S = list(input().split())
    s.append(S)

for i in range(h):
    for j in range(w):
        if s[i][j] == "snuke":
            l = str.upper(chr(ord("a") + j))
            print(l + str(i + 1))
            exit()

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':
            print(chr(ord('A') + j) + str(i + 1))

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':
            print(chr(j+65) + str(i+1))
            exit()

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
c = ["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"]
x = ""
for i in range(a):
    x = input().split()
    if x.count("snuke") == True:
        for j in range(b):
            if x[j] == "snuke":
                print(c[j] + str(i+1))

Submission status: Accepted

Solution code:
import sys, math
from functools import lru_cache
from collections import deque

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    H, W = mi()
    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))
                return


        

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
h,w = map(int,input().split())
s = [list(input().split()) for _ in range(h)]
ch = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
word = "snuke"
for i in range(h):
    for j in range(w):
        if s[i][j] == word:
            print(ch[j],i+1,sep = "")
            break

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rf = lambda: map(float, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

h,w = rm()
for i in range(h):
    a = list(rs())
    for idx, j in enumerate(a):
        if j == 'snuke':
            print(f'{chr(65+idx)}{i+1}')
            exit()

Submission status: Accepted

Solution code:
'''
Created on 2020/08/20

@author: harurun
'''
def main():
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write
  
  H,W=map(int,pin().split())
  ans=""
  for i in range(H):
    S=list(pin().split())
    for j in range(W):
      if S[j]=="snuke":
        ans=f"{chr(65+j)}{i+1}"
  print(ans)
  return 

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections


def main():
    aList = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    text = ""
    H, W = map(int, input().split())
    for h in range(H):
        wList = list(map(str, input().split()))
        if wList.count("snuke") == 1:
            text = aList[wList.index("snuke")] + str(h + 1)
    print(text)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H,W = map(int, input().split())
alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
for i in range(H):
  for j,x in enumerate(input().split()):
    if x == 'snuke':
      ret = alpha[j] + str(i+1)
      print(ret)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num2alpha = lambda c: chr(c+64)

h, w = map(int, input().split())

for i in range(h):
    sunuke = input().split()
    for j in range(w):
        if sunuke[j] == "snuke":
            print(num2alpha(j+1)+str(i+1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h,w = map(int,input().split())
for i in range(h):
    tmp = list(input().split())
    for j in range(w):
        if tmp[j] == "snuke":
            num2alpha = lambda c: chr(c+64)
            print(num2alpha(j + 1) + str(i + 1))

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
idx_h = None
idx_w = None
for i in range(h):
    words = list(map(str, input().split()))
    for j in range(w):
        if words[j] == 'snuke':
            idx_h = i
            idx_w = j
        else:
            pass
ans = str(chr(97 + idx_w).upper()) + str(idx_h+1)
print(ans)

Submission status: Accepted

Solution code:
import sys
from string import ascii_uppercase as A2Z

input = sys.stdin.readline


def main():
    H, W = map(int, input().split())
    S = [None] * H
    for i in range(H):
        S[i] = input().split()

    for h in range(H):
        for w in range(W):
            if S[h][w] == "snuke":
                ans = A2Z[w] + str(h + 1)

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
ans = ''
for i in range(h):
    for j, k in enumerate(input().split()):
        if k == 'snuke':
            ans = '%s%d' % (chr(65+j), i+1)
print(ans)

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 accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_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(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

H, W = MAP()
S = [input().split() for _ in range(H)]

for i, s in enumerate(S):
    if "snuke" in s:
        print(ascii_uppercase[s.index("snuke")], i+1, sep="")
        break

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
cnt=0
import  sys
def num2alpha(num):
    if num<=26:
        return chr(64+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(90)
    else:
        return num2alpha(num//26)+chr(64+num%26)

for i in range(H):
    cnt+=1
    row=list(map(str,input().split()))
    if row.count('snuke') !=0:
        f=row.index('snuke')+1
        ff=num2alpha(f)
        print(ff,cnt,sep='')
        sys.exit()
print('No')

Submission status: Accepted

Solution code:


def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    H,W=MI()
    ans=0
    for i in range(H):
        s=input().split()
        if "snuke" in s:
            n=s.index("snuke")
            ans=(chr(n+97)).upper()+str(i+1)
            
    print(ans)
    

main()

Submission status: Accepted

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

for i in range(H):
	s = list(input().split())
	for j in range(W):
		if s[j] == "snuke":
			print(chr(j+ord('A')) + str(i+1))
			exit()

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
s = [[] for _ in range(h)]
resh, resw = 0, 0
for i in range(h):
    s[i] = input().split()
    if 'snuke' in s[i]:
        resh, resw = i + 1, s[i].index('snuke')

print(chr(65 + resw), resh, sep='')