import sys,copy

input = sys.stdin.readline

sys.setrecursionlimit(10**6)

inf = float('inf')



N = int(eval(input()))

ad = [{} for _ in range(N)]

dis = [inf]*N

near = [-1]*N

player = ["Fennec","Snuke"]



for i in range(N-1):

    a,b = list(map(int,input().split()))

    a -= 1; b -= 1

    ad[a][i] = b

    ad[b][i] = a



back_up = [copy.deepcopy(line) for line in ad]



def dfs(v,start,depth=0):

    if dis[v] > depth:

        dis[v] = depth

        near[v] = start

    if not ad[v]:

        return

    while ad[v]:

        key,nv = ad[v].popitem()

        ad[nv].pop(key)

        dfs(nv,start,depth+1)



dfs(0,0)

ad = back_up

dfs(N-1,N-1)

f = near.count(0)

s = N-f

ans = player[0] if f > s else player[1]

print(ans)
import sys

input = sys.stdin.readline

from collections import deque



N = int(eval(input()))

ad = [[] for _ in range(N)]

dis = [[-1]*N,[-1]*N]



for _ in range(N-1):

    a,b = list(map(int,input().split()))

    a -= 1; b -= 1

    ad[a].append(b); ad[b].append(a)



def bfs(s):

    index = 0 if s == 0 else 1

    dq = deque()

    dq.append((s,0,-1))

    while dq:

        v,d,pre = dq.popleft()

        dis[index][v] = d

        for nv in ad[v]:

            if nv == pre:continue

            dq.append((nv,d+1,v))



bfs(0); bfs(N-1)

f = 0; s = 0

for d0,d1 in zip(dis[0],dis[1]):

    if d0 <= d1: f += 1

    else: s += 1

ans = "Fennec" if f > s else "Snuke"

print(ans)
import sys, copy

input = sys.stdin.readline
sys.setrecursionlimit(10**6)
inf = float("inf")
N = int(eval(input()))
ad = [{} for _ in range(N)]
dis = [inf] * N
near = [-1] * N
player = ["Fennec", "Snuke"]
for i in range(N - 1):
    a, b = list(map(int, input().split()))
    a -= 1
    b -= 1
    ad[a][i] = b
    ad[b][i] = a
back_up = [copy.deepcopy(line) for line in ad]


def dfs(v, start, depth=0):
    if dis[v] > depth:
        dis[v] = depth
        near[v] = start
    if not ad[v]:
        return
    while ad[v]:
        key, nv = ad[v].popitem()
        ad[nv].pop(key)
        dfs(nv, start, depth + 1)


dfs(0, 0)
ad = back_up
dfs(N - 1, N - 1)
f = near.count(0)
s = N - f
ans = player[0] if f > s else player[1]
print(ans)

import sys

input = sys.stdin.readline
from collections import deque

N = int(eval(input()))
ad = [[] for _ in range(N)]
dis = [[-1] * N, [-1] * N]
for _ in range(N - 1):
    a, b = list(map(int, input().split()))
    a -= 1
    b -= 1
    ad[a].append(b)
    ad[b].append(a)


def bfs(s):
    index = 0 if s == 0 else 1
    dq = deque()
    dq.append((s, 0, -1))
    while dq:
        v, d, pre = dq.popleft()
        dis[index][v] = d
        for nv in ad[v]:
            if nv == pre:
                continue
            dq.append((nv, d + 1, v))


bfs(0)
bfs(N - 1)
f = 0
s = 0
for d0, d1 in zip(dis[0], dis[1]):
    if d0 <= d1:
        f += 1
    else:
        s += 1
ans = "Fennec" if f > s else "Snuke"
print(ans)

-import sys, copy +import sys -sys.setrecursionlimit(10**6) -inf = float("inf") +from collections import deque + -ad = [{} for _ in range(N)] -dis = [inf] * N -near = [-1] * N -player = ["Fennec", "Snuke"] -for i in range(N - 1): +ad = [[] for _ in range(N)] +dis = [[-1] * N, [-1] * N] +for _ in range(N - 1): -    ad[a][i] = b -    ad[b][i] = a -back_up = [copy.deepcopy(line) for line in ad] +    ad[a].append(b) +    ad[b].append(a) -def dfs(v, start, depth=0): -    if dis[v] > depth: -        dis[v] = depth -        near[v] = start -    if not ad[v]: -        return -    while ad[v]: -        key, nv = ad[v].popitem() -        ad[nv].pop(key) -        dfs(nv, start, depth + 1) +def bfs(s): +    index = 0 if s == 0 else 1 +    dq = deque() +    dq.append((s, 0, -1)) +    while dq: +        v, d, pre = dq.popleft() +        dis[index][v] = d +        for nv in ad[v]: +            if nv == pre: +                continue +            dq.append((nv, d + 1, v)) -dfs(0, 0) -ad = back_up -dfs(N - 1, N - 1) -f = near.count(0) -s = N - f -ans = player[0] if f > s else player[1] +bfs(0) +bfs(N - 1) +f = 0 +s = 0 +for d0, d1 in zip(dis[0], dis[1]): +    if d0 <= d1: +        f += 1 +    else: +        s += 1 +ans = "Fennec" if f > s else "Snuke"