from itertools import product
from collections import defaultdict
H, W = map(int, input().split())
S = [input() for _ in range(H)]
SNUKE = "snuke"
next_char = {
"s": "n",
"n": "u",
"u": "k",
"k": "e",
"e": None,
}
chars = defaultdict(set)
for h, w in product(range(H), range(W)):
if S[h][w] in SNUKE:
chars[S[h][w]].add((h, w))
f = [
lambda x: x + 1,
lambda x: x - 1,
lambda x: x
]
def search(c, h, w, h_n, w_n):
ans.append((h + 1, w + 1))
if c == "e":
[print(h, w) for h, w in ans]
exit()
if (h_n(h), w_n(w)) in chars[next_char[c]]:
search(next_char[c], h_n(h), w_n(w), h_n, w_n)
for h, w in chars["s"]:
for h_next, w_next in product(f, f):
ans = []
search("s", h, w, h_next, w_next)