N=int(eval(input()))

import collections

import heapq

ab=[tuple(map(int,input().split())) for i in range(N-1)]

G=[set() for i in range(N)]

for a,b in ab:

  a-=1

  b-=1

  G[a].add(b)

  G[b].add(a)

q=collections.deque()



dis=[[-1]*N for i in range(2)]

dis[0][0]=0

q.append(0)

while(q):

  x=q.popleft()

  for y in G[x]:

    if dis[0][y]==-1:

      q.append(y)

      dis[0][y]=dis[0][x]+1

dis[1][N-1]=0

q.append(N-1)

while(q):

  x=q.popleft()

  for y in G[x]:

    if dis[1][y]==-1:

      q.append(y)

      dis[1][y]=dis[1][x]+1



hqF=[(0,0)]

hqS=[(0,N-1)]

colord=[False]*N



while(1):

  if len(hqF)==0:

    print("Snuke")

    exit(0)

  _,x = heapq.heappop(hqF)

  while(colord[x]):

    if hqF:

      _,x = heapq.heappop(hqF)

    else:

      print("Snuke")

      exit(0)

  colord[x]=True

  for y in G[x]:

    if colord[y]==False:

      heapq.heappush(hqF,(dis[1][y],y))



  if len(hqS)==0:

    print("Fennec")

    exit(0)

  _,x = heapq.heappop(hqS)

  while(colord[x]):

    if hqF:

      _,x = heapq.heappop(hqS)

    else:

      print("Fennec")

      exit(0)

  colord[x]=True

  for y in G[x]:

    if colord[y]==False:

      heapq.heappush(hqS,(dis[0][y],y))

import collections

N = int(eval(input()))

G = [set() for i in range(N)]



for i in range(N-1):

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

    a -= 1

    b -= 1

    G[a].add(b)

    G[b].add(a)





F = [-1]*N

F[0] = 0

q = collections.deque()

q.append(0)

while(q):

    x = q.popleft()

    for y in G[x]:

        if F[y] < 0:

            F[y] = F[x] + 1

            q.append(y)



S = [-1]*N

S[N-1] = 0

q.append(N-1)

while(q):

    x = q.popleft()

    for y in G[x]:

        if S[y] < 0:

            S[y] = S[x] + 1

            q.append(y)

# print(F)

# print(S)

ans = 0



q = collections.deque()

r = [True]*N

for i in range(N):

    if F[i] + S[i] == F[-1]:

        if F[i] <= S[i]:

            q.append(i)

            r[i] = False

        else:

            r[i] = False

ans = len(q)



while(q):

    x = q.popleft()

    for y in G[x]:

        if r[y]:

            ans += 1

            q.append(y)

            r[y] = False



if ans > N - ans:

    print("Fennec")

else:

    print("Snuke")

N = int(eval(input()))
import collections
import heapq

ab = [tuple(map(int, input().split())) for i in range(N - 1)]
G = [set() for i in range(N)]
for a, b in ab:
    a -= 1
    b -= 1
    G[a].add(b)
    G[b].add(a)
q = collections.deque()
dis = [[-1] * N for i in range(2)]
dis[0][0] = 0
q.append(0)
while q:
    x = q.popleft()
    for y in G[x]:
        if dis[0][y] == -1:
            q.append(y)
            dis[0][y] = dis[0][x] + 1
dis[1][N - 1] = 0
q.append(N - 1)
while q:
    x = q.popleft()
    for y in G[x]:
        if dis[1][y] == -1:
            q.append(y)
            dis[1][y] = dis[1][x] + 1
hqF = [(0, 0)]
hqS = [(0, N - 1)]
colord = [False] * N
while 1:
    if len(hqF) == 0:
        print("Snuke")
        exit(0)
    _, x = heapq.heappop(hqF)
    while colord[x]:
        if hqF:
            _, x = heapq.heappop(hqF)
        else:
            print("Snuke")
            exit(0)
    colord[x] = True
    for y in G[x]:
        if colord[y] == False:
            heapq.heappush(hqF, (dis[1][y], y))
    if len(hqS) == 0:
        print("Fennec")
        exit(0)
    _, x = heapq.heappop(hqS)
    while colord[x]:
        if hqF:
            _, x = heapq.heappop(hqS)
        else:
            print("Fennec")
            exit(0)
    colord[x] = True
    for y in G[x]:
        if colord[y] == False:
            heapq.heappush(hqS, (dis[0][y], y))

import collections

N = int(eval(input()))
G = [set() for i in range(N)]
for i in range(N - 1):
    a, b = list(map(int, input().split()))
    a -= 1
    b -= 1
    G[a].add(b)
    G[b].add(a)
F = [-1] * N
F[0] = 0
q = collections.deque()
q.append(0)
while q:
    x = q.popleft()
    for y in G[x]:
        if F[y] < 0:
            F[y] = F[x] + 1
            q.append(y)
S = [-1] * N
S[N - 1] = 0
q.append(N - 1)
while q:
    x = q.popleft()
    for y in G[x]:
        if S[y] < 0:
            S[y] = S[x] + 1
            q.append(y)
# print(F)
# print(S)
ans = 0
q = collections.deque()
r = [True] * N
for i in range(N):
    if F[i] + S[i] == F[-1]:
        if F[i] <= S[i]:
            q.append(i)
            r[i] = False
        else:
            r[i] = False
ans = len(q)
while q:
    x = q.popleft()
    for y in G[x]:
        if r[y]:
            ans += 1
            q.append(y)
            r[y] = False
if ans > N - ans:
    print("Fennec")
else:
    print("Snuke")

+import collections + -import collections -import heapq - -ab = [tuple(map(int, input().split())) for i in range(N - 1)] -for a, b in ab: +for i in range(N - 1): +    a, b = list(map(int, input().split())) +F = [-1] * N +F[0] = 0 -dis = [[-1] * N for i in range(2)] -dis[0][0] = 0 -        if dis[0][y] == -1: +        if F[y] < 0: +            F[y] = F[x] + 1 -            dis[0][y] = dis[0][x] + 1 -dis[1][N - 1] = 0 +S = [-1] * N +S[N - 1] = 0 -        if dis[1][y] == -1: +        if S[y] < 0: +            S[y] = S[x] + 1 -            dis[1][y] = dis[1][x] + 1 -hqF = [(0, 0)] -hqS = [(0, N - 1)] -colord = [False] * N -while 1: -    if len(hqF) == 0: -        print("Snuke") -        exit(0) -    _, x = heapq.heappop(hqF) -    while colord[x]: -        if hqF: -            _, x = heapq.heappop(hqF) +# print(F) +# print(S) +ans = 0 +q = collections.deque() +r = [True] * N +for i in range(N): +    if F[i] + S[i] == F[-1]: +        if F[i] <= S[i]: +            q.append(i) +            r[i] = False -            print("Snuke") -            exit(0) -    colord[x] = True +            r[i] = False +ans = len(q) +while q: +    x = q.popleft() -        if colord[y] == False: -            heapq.heappush(hqF, (dis[1][y], y)) -    if len(hqS) == 0: -        print("Fennec") -        exit(0) -    _, x = heapq.heappop(hqS) -    while colord[x]: -        if hqF: -            _, x = heapq.heappop(hqS) -        else: -            print("Fennec") -            exit(0) -    colord[x] = True -    for y in G[x]: -        if colord[y] == False: -            heapq.heappush(hqS, (dis[0][y], y)) +        if r[y]: +            ans += 1 +            q.append(y) +            r[y] = False +if ans > N - ans: +    print("Fennec") +else: +    print("Snuke")