CodeEff/ECCO huggingface dataset:
# Original solution
from collections import deque
N = int(eval(input()))
G = {}
for i in range(N-1):
    a,b = list(map(int,input().split()))
    if a not in G:
        G[a] = []
    G[a].append(b)
    if b not in G:
        G[b] = []
    G[b].append(a)
hist = [-1 for _ in range(N+1)]
heapF = deque([(1,0)])
hist[1] = 0
heapS = deque([(N,0)])
hist[N] = 1
turn = 0
while heapF or heapS:
    if turn%2==0:
        while heapF:
            cur = heapF.popleft()
            if cur[1]==turn//2:
                for x in G[cur[0]]:
                    if hist[x]<0:
                        heapF.append((x,cur[1]+1))
                        hist[x] = 0
            else:
                heapF.append(cur)
                break
    else:
        while heapS:
            cur = heapS.popleft()
            if cur[1]==turn//2:
                for x in G[cur[0]]:
                    if hist[x]<0:
                        heapS.append((x,cur[1]+1))
                        hist[x] = 1
            else:
                heapS.append(cur)
                break
    turn += 1
n = hist.count(0)
m = hist.count(1)
if m>=n:
    print("Snuke")
else:
    print("Fennec")

# Optimized solution
from collections import deque
N = int(eval(input()))
G = {i:[] for i in range(1,N+1)}
for _ in range(N-1):
    a,b = list(map(int,input().split()))
    G[a].append(b)
    G[b].append(a)
dist = [0 for _ in range(N+1)]
que = deque([(1,0)])
hist = [0 for _ in range(N+1)]
hist[1] = 1
while que:
    x,d = que.popleft()
    for y in G[x]:
        if hist[y]==0:
            hist[y] = 1
            dist[y] = d+1
            que.append((y,d+1))
pa ={}
x = N
while x!=1:
    for y in G[x]:
        if dist[y]==dist[x]-1:
            pa[x] = y
            break
    x = pa[x]
ch = {}
x=N
while x!=1:
    y = pa[x]
    ch[y] = x
    x = y
if dist[N]%2==1:
    k = dist[N]//2
    cnt = 0
    x = 1
    y = N
    while cnt<k:
        x = ch[x]
        y = pa[y]
        cnt += 1
    G[x].remove(y)
    G[y].remove(x)
    hist = [0 for _ in range(N+1)]
    que = deque([1])
    hist[1] = 1
    while que:
        a = que.popleft()
        for b in G[a]:
            if hist[b]==0:
                hist[b]=1
                que.append(b)
    n1 = sum(hist)
    n2 = N-n1
    if n1>n2:
        print("Fennec")
    else:
        print("Snuke")
else:
    k = dist[N]//2
    cnt = 0
    x = 1
    while cnt<k:
        x = ch[x]
        cnt += 1
    y = ch[x]
    G[x].remove(y)
    G[y].remove(x)
    hist = [0 for _ in range(N+1)]
    que = deque([1])
    hist[1] = 1
    while que:
        a = que.popleft()
        for b in G[a]:
            if hist[b]==0:
                hist[b]=1
                que.append(b)
    n1 = sum(hist)
    n2 = N-n1
    if n1>n2:
        print("Fennec")
    else:
        print("Snuke")
# Original solution
import sys
sys.setrecursionlimit(2000000)
def input():
    return sys.stdin.readline()[:-1]
n=int(eval(input()))
ab=[list(map(int,input().split())) for i in range(n-1)]
ki=[[] for i in range(n+1)]
for i in range(n-1):
    ki[ab[i][0]].append(ab[i][1])
    ki[ab[i][1]].append(ab[i][0])
# print(ki)
kyori=[[0,0] for i in range(n+1)]
def tansaku(m, dis, hito):
    if not ki[m]:
        kyori[m][hito]=dis
        return
    elif kyori[m][hito]!=0:
        return
    else:
        kyori[m][hito]=dis
        for i in range(len(ki[m])):
            tansaku(ki[m][i], dis+1, hito)
tansaku(1,1,0)
tansaku(n,1,1)
fe,su=0,0

for i in range(1,n+1):
    if kyori[i][0]<=kyori[i][1]:
        fe+=1
    else:
        su+=1

if fe>su:
    print("Fennec")
else:
    print("Snuke")

# Optimized solution
import sys
sys.setrecursionlimit(2000000)
def input():
    return sys.stdin.readline()[:-1]
n=int(eval(input()))
ab=[list(map(int,input().split())) for i in range(n-1)]
ki=[[] for i in range(n+1)]
for i in range(n-1):
    ki[ab[i][0]].append(ab[i][1])
    ki[ab[i][1]].append(ab[i][0])
# print(ki)
kyori=[[float("INF"), float("INF")] for i in range(n+1)]
def tansaku(m, dis, hito):
    q=[[m,dis]]
    while q:
        po=q.pop()
        for i in ki[po[0]]:
            if kyori[i][hito]>po[1]:
                kyori[i][hito]=po[1]
                q.append([i,po[1]+1])

tansaku(1,1,0)
tansaku(n,1,1)
fe,su=0,0

for i in range(1,n+1):
    if kyori[i][0]<=kyori[i][1]:
        fe+=1
    else:
        su+=1

if fe>su:
    print("Fennec")
else:
    print("Snuke")
# Original solution
import queue
inf = float('inf')
N = int(eval(input()))
paths = [{} for i in range(N+1)]
for i in range(N-1):
    s,t = list(map(int, input().split()))
    paths[s][t] = 1
    paths[t][s] = 1

def dijkstra(start, nodes, N):
    fixed = {}
    cost = [inf] * (N + 1)
    cost[start] = 0
    q = queue.PriorityQueue()
    q.put((0, start))
    while q.empty() == False:
        w, x = q.get()
        if cost[x] < w: continue
        for y in nodes[x]:
            if cost[x] + paths[x][y] < cost[y]:
                cost[y] = cost[x] + paths[x][y]
                q.put((cost[y], y))
    return cost

# それぞれの位置からの到達コストを調べている
score_f = dijkstra(1, paths, N)
score_s = dijkstra(N, paths, N)

score = 0
for i in range(1, N+1):
    if score_f[i] > score_s[i]:
        score -= 1
    else:
        score += 1

if score > 0:
    print("Fennec")
else:
    print("Snuke")


# Optimized solution
#import queue
import heapq
inf = float('inf')
N = int(eval(input()))
paths = [{} for i in range(N+1)]
for i in range(N-1):
    s,t = list(map(int, input().split()))
    paths[s][t] = 1
    paths[t][s] = 1

def dijkstra(start, nodes, N):
    cost = [inf] * (N + 1)
    cost[start] = 0
    q = []
    heapq.heappush(q, (0, start))
#    q.put((0, start))
    while q: #q.empty() == False:
        w, x = heapq.heappop(q)
        if cost[x] < w: continue
        for y in nodes[x]:
            if cost[x] + paths[x][y] < cost[y]:
                cost[y] = cost[x] + paths[x][y]
#                q.put((cost[y], y))
                heapq.heappush(q, (cost[y], y))
    return cost

# それぞれの位置からの到達コストを調べている
score_f = dijkstra(1, paths, N)
score_s = dijkstra(N, paths, N)

score = 0
for i in range(1, N+1):
    if score_f[i] > score_s[i]:
        score -= 1
    else:
        score += 1

if score > 0:
    print("Fennec")
else:
    print("Snuke")
# Original solution
from collections import*
n,*L=list(map(int,open(0).read().split()))
G=[[]for _ in range(n)]
for a,b in zip(*[iter(L)]*2):
	G[a-1]+=[b-1]
	G[b-1]+=[a-1]
def F(m):
	q=deque([m])
	d=[-1]*n
	while q:
		cur=q.popleft()
		for nxt in G[cur]:
			if d[nxt]<0:
				q.append(nxt)
				d[nxt]=d[cur]+1
	return d
print(("FSennunkeec"[sum(i>j or-1 for i,j in zip(F(0),F(n-1)))>=0::2]))

# Optimized solution
from collections import deque
def F(m):
	q=deque([m])
	d=[-1]*n
	while q:
		cur=q.popleft()
		for nxt in G[cur]:
			if d[nxt]<0:
				q.append(nxt)
				d[nxt]=d[cur]+1
	return d
def solve():
	global n,G
	n,*L=list(map(int,open(0).read().split()))
	G=[[]for _ in range(n)]
	for a,b in zip(*[iter(L)]*2):
		G[a-1]+=[b-1]
		G[b-1]+=[a-1]
	print(("FSennunkeec"[sum(i>j or-1 for i,j in zip(F(0),F(n-1)))>=0::2]))
if __name__=="__main__":solve()
# Original solution
import sys
sys.setrecursionlimit(1000000000)

n = int(eval(input()))
G = [[] for _ in range(n)]
for _ in range(n-1):
    a,b = list(map(int,input().split()))
    a -= 1
    b -= 1
    G[a].append(b)
    G[b].append(a)

dist = [(0,-1) for _ in range(n)]
def dfs(now,prev=-1):
    for nxt in G[now]:
        if nxt == prev: continue
        dist[nxt] = (dist[now][0]+1,now)
        dfs(nxt,now)
dfs(0)

color = ["?"]*n
cnt = 0
now = n-1
w = (dist[n-1][0]+1)//2
while now != -1:
    if cnt < w: color[now] = -1
    else: color[now] = 1
    cnt += 1
    now = dist[now][1]

def coloring(now,prev=-1):
    for nxt in G[now]:
        if nxt == prev: continue
        if color[nxt] != "?" and color[now] != color[nxt]: continue
        color[nxt] = color[now]
        coloring(nxt,now)
coloring(0)
coloring(n-1)

print(("Fennec" if sum(color) > 0 else "Snuke"))

# Optimized solution
import sys
sys.setrecursionlimit(1000000000)

n = int(eval(input()))
G = [[] for _ in range(n)]
for _ in range(n-1):
    a,b = list(map(int,input().split()))
    a -= 1
    b -= 1
    G[a].append(b)
    G[b].append(a)

dist1 = [-1]*n
dist1[0] = 0
dist2 = [-1]*n
dist2[n-1] = 0
def dfs(now,dist):
    for nxt in G[now]:
        if dist[nxt] != -1: continue
        dist[nxt] = dist[now]+1
        dfs(nxt,dist)
dfs(0,dist1)
dfs(n-1,dist2)

fennec = snuke = 0
for i in range(n):
    if dist1[i] <= dist2[i]: fennec += 1
    else: snuke += 1
print(("Fennec" if fennec > snuke else "Snuke"))
# Original solution
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)

def main():
  n = int(eval(input()))
  F = [[] for _ in range(n)]
  for _ in range(n-1):
    a, b = list(map(int, input().split()))
    a -= 1
    b -= 1
    F[a].append(b)
    F[b].append(a)
  seenB = [False]*n
  seenW = [False]*n
  distB = [0]*n
  distW = [0]*n
  def dfs(v, seen, dist):
    seen[v] = True
    for nv in F[v]:
      if seen[nv]:
        continue
      dist[nv] = dist[v] + 1
      dfs(nv, seen, dist)
  dfs(0, seenB, distB)
  dfs(n-1, seenW, distW)
  b, w = 0, 0
  for i in range(n):
    if distB[i] <= distW[i]:
      b += 1
    else:
      w += 1
  if b > w:
    print("Fennec")
  else:
    print("Snuke")
      
if __name__ == '__main__':
  main()

# Optimized solution
import sys
input = sys.stdin.readline

n = int(eval(input()))
T = [[] for _ in range(n)]
for _ in range(n-1):
  a, b = list(map(int, input().split()))
  a -= 1
  b -= 1
  T[a].append(b)
  T[b].append(a)
def dfs(v):
  dist = [-1]*n
  dist[v] = 0
  stack = [v]
  while stack:
    nv = stack.pop()
    for i in T[nv]:
      if dist[i] == -1:
        dist[i] = dist[nv] + 1
        stack.append(i)
  return dist
B = dfs(0)
W = dfs(n-1)
cnt_b, cnt_w = 0, 0
for i in range(n):
  if B[i] <= W[i]:
    cnt_b += 1
  else:
    cnt_w += 1
if cnt_b > cnt_w:
  print("Fennec")
else:
  print("Snuke")
# Original solution
import sys
from collections import defaultdict
from collections import deque

n=int(eval(input()))
edges=[tuple(map(int,input().split())) for _ in range(n-1)]
d=defaultdict(list)
for e in edges:
  d[e[0]].append(e[1])
  d[e[1]].append(e[0])
fnc=[-1]*(n+1)
snk=[-1]*(n+1)
fnc[1]=0
snk[n]=0
cv=deque([1])
nv=deque([1])
c=-1
while nv:
  c+=1
  cv.extend(nv)
  nv.clear()
  for e in cv:
    fnc[e]=c
    for x in d[e]:
      if fnc[x]<0:
        nv.append(x)
  cv.clear()
cv.append(n)
nv=deque([1])
c=-1
while nv:
  c+=1
  cv.extend(nv)
  nv.clear()
  for e in cv:
    snk[e]=c
    for x in d[e]:
      if snk[x]<0:
        nv.append(x)
  cv.clear()

j=sum([(fnc[i]<=snk[i])-(fnc[i]>snk[i]) for i in range(1,n+1)])
if j>0:
  print('Fennec')
else:
  print('Snuke')

# Optimized solution
from collections import deque, defaultdict

def main():
  n=int(eval(input()))
  edges=[tuple(map(int,input().split())) for _ in range(n-1)]
  d=defaultdict(list)
  for e in edges:
    d[e[0]].append(e[1])
    d[e[1]].append(e[0])
  def dist(m):
    c=-1
    dl=[-1]*(n+1)
    cv=deque([m])
    nv=deque([1])
    while nv:
      c+=1
      cv.extend(nv)
      nv.clear()
      for e in cv:
        dl[e]=c
        for x in d[e]:
          if dl[x]<0:
            nv.append(x)
      cv.clear()
    return dl[1:]
  fnc=dist(1)
  snk=dist(n)
  j=sum([(fnc[i]<=snk[i])-(fnc[i]>snk[i]) for i in range(n)])
  if j>0:
    print('Fennec')
  else:
    print('Snuke')

if __name__=='__main__':
    main()
# Original solution
#高速化heapqダイクストラ
from collections import *
from heapq import*
import sys
input=lambda:sys.stdin.readline()


def BFS(point,d):
    cost=[1e7]*(n+1)
    cost[point]=0
    Q=deque([(0,point)])
    
    while Q:
        c,p = Q.popleft()
        for np in d[p]:
            if cost[np]==1e7:
                cost[np]=c+1
                Q.append((c+1,np))
    return cost

n=int(eval(input()))
d={}
for i in range(n-1):
    a,b=list(map(int,input().split()))
    if a in list(d.keys()):
        d[a].append(b)
    else:
        d[a]=[b]
    if b in list(d.keys()):
        d[b].append(a)
    else:
        d[b]=[a]
        
x=BFS(1,d)[1:]
y=BFS(n,d)[1:]

#print(x,y)

F=0
S=0

for s,t in zip(x,y):
    if s<=t:
        F+=1
    else:
        S+=1

if F<=S:
    print("Snuke")
else:
    print("Fennec")


# Optimized solution
#高速化heapqダイクストラ
from collections import *
from heapq import*
import sys
input=lambda:sys.stdin.readline()


def BFS(point,d):
    cost=[1e7]*(n+1)
    cost[point]=0
    Q=deque([(0,point)])
    
    while Q:
        c,p = Q.popleft()
        for np in d[p]:
            if cost[np]==1e7:
                cost[np]=c+1
                Q.append((c+1,np))
    return cost

n=int(eval(input()))
# d={}
d=[[] for _ in range(n+1)]
for i in range(n-1):
    a,b=list(map(int,input().split()))
    d[a].append(b)
    d[b].append(a)
    
    # if a in d.keys():
    #     d[a].append(b)
    # else:
    #     d[a]=[b]
    # if b in d.keys():
    #     d[b].append(a)
    # else:
    #     d[b]=[a]
        
x=BFS(1,d)[1:]
y=BFS(n,d)[1:]

#print(x,y)

F=0
S=0

for s,t in zip(x,y):
    if s<=t:
        F+=1
    else:
        S+=1

if F<=S:
    print("Snuke")
else:
    print("Fennec")
# Original solution
# coding: utf-8
# Your code here!
import sys

sys.setrecursionlimit(10**6)

def killme(num,lis):
    visited[num]=1
    if num==N-1:
        lis.append(num)
        for index,item in enumerate(lis):
            highway[item]=index
    else:
        for next_n in way[num]:
            if visited[next_n]==0:
                killme(next_n,lis+[num])
    return 

def dfs(num,root):
    visited[num]=1
    cluster[root].append(num)
    for next_n in way[num]:
        if visited[next_n]==0 and highway[next_n]==-1:
            #print(next_n,root)
            dfs(next_n,root)
    return 

N=int(eval(input()))

way=[[] for i in range(N)]
visited=[0]*N
highway=[-1]*N

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

killme(0,[])

#print(way)
#print(visited)
#print(highway)

visited=[0]*N
cluster=[[] for i in range(highway[-1]+1)]

for index,item in enumerate(highway):
    if item!=-1:
        dfs(index,item)

F=0
S=0
for i in range(highway[-1]+1):
    if i<=highway[-1]//2:
        F+=len(cluster[i])
    else:
        S+=len(cluster[i])

if F>S:
    print("Fennec")
else:
    print("Snuke")
#print(F,S)
    



# Optimized solution
# coding: utf-8
# Your code here!
import sys

sys.setrecursionlimit(10**6)

def killme(num,lis):
    visited[num]=1
    if num==N-1:
        lis.append(num)
        for index,item in enumerate(lis):
            highway[item]=index
    else:
        for next_n in way[num]:
            if visited[next_n]==0:
                lis.append(num)
                killme(next_n,lis)
                lis.pop(-1)
    return 

def dfs(num,root):
    visited[num]=1
    cluster[root].append(num)
    for next_n in way[num]:
        if visited[next_n]==0 and highway[next_n]==-1:
            #print(next_n,root)
            dfs(next_n,root)
    return 

N=int(eval(input()))

way=[[] for i in range(N)]
visited=[0]*N
highway=[-1]*N

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

killme(0,[])

#print(way)
#print(visited)
#print(highway)

visited=[0]*N
cluster=[[] for i in range(highway[-1]+1)]

for index,item in enumerate(highway):
    if item!=-1:
        dfs(index,item)

F=0
S=0
for i in range(highway[-1]+1):
    if i<=highway[-1]//2:
        F+=len(cluster[i])
    else:
        S+=len(cluster[i])

if F>S:
    print("Fennec")
else:
    print("Snuke")
#print(F,S)
# Original solution
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))


# Optimized solution
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")
# Original solution
n = int(eval(input()))

p = [ [] for _ in range(n) ]
for i in range(n - 1):
    a, b = list(map(int, input().split()))
    p[a - 1].append(b - 1)
    p[b - 1].append(a - 1)

f = [[0], []]
d = 1

f[1] = f[1] + p[0]

while 1:
    if n - 1 in f[d]:
        break
    temp = []
    for i in f[d]:
        temp = [] + p[i]
    temp = list(set(temp))
    f.append([])
    d += 1
    f[d] = [] + temp

route = [n - 1]
t = n - 1
for i in range(d, 0, -1):
    for j in f[i - 1]:
        if t in p[j]:
            t = j
            route.append(t)

#print(f)
#print(route)

mid = route[ len(route) // 2 - 1 ]

#print(mid)

f = [[0], []]
d = 1

f[1] = f[1] + p[0]

check = 1
if mid in f[1]:
    f[1].remove(mid)
    if len(f[1]) == 0:
        check = 0

while check:
    temp = []
    for i in f[d]:
        temp = [] + p[i]
    temp = list(set(temp))
    if mid in temp:
        temp.remove(mid)
    for i in f[d - 1]:
        if i in temp:
            temp.remove(i)
    if len(temp) == 0:
        break
    f.append([])
    d += 1
    f[d] = [] + temp

fe = sum(len(v) for v in f)

mid = route[ len(route) // 2 ]

f = [[n - 1], []]
d = 1

f[1] = f[1] + p[n - 1]

check = 1
if mid in f[1]:
    f[1].remove(mid)
    if len(f[1]) == 0:
        check = 0

while check:
    temp = []
    for i in f[d]:
        temp = [] + p[i]
    temp = list(set(temp))
    if mid in temp:
        temp.remove(mid)
    for i in f[d - 1]:
        if i in temp:
            temp.remove(i)
    if len(temp) == 0:
        break
    f.append([])
    d += 1
    f[d] = [] + temp

sn = sum(len(v) for v in f)

if fe > sn:
    print("Fennec")
else:
    print("Snuke")

# Optimized solution
n = int(eval(input()))

p = [[] for _ in range(n)]
for i in range(n - 1):
    x, y = list(map(int, input().split()))
    p[x - 1].append(y - 1)
    p[y - 1].append(x - 1)

f = [n for _ in range(n)]
s = [n for _ in range(n)]

f[0] = 0
after = [] + p[0]
before = set()
dist = 0
while 1:
    dist += 1
    check = 0
    temp = []
    for x in after:
        if f[x] == n:
            f[x] = dist
            temp += p[x]
            check = 1
    if check == 0:
        break
    t2 = set(temp) - before
    before = set(after)
    after = list(t2)

s[n - 1] = 0
after = [] + p[n - 1]
before = set()
dist = 0
while 1:
    dist += 1
    check = 0
    temp = []
    for x in after:
        if s[x] == n:
            s[x] = dist
            temp += p[x]
            check = 1
    if check == 0:
        break
    t2 = set(temp) - before
    before = set(after)
    after = list(t2)

score_f = 0
for i in range(n):
    if f[i] <= s[i]:
        score_f += 1

if score_f > n - score_f:
    print('Fennec')
else:
    print('Snuke')
# Original solution
from collections import defaultdict,Counter
import queue

N=int(eval(input()))
ab=defaultdict(list)
for i in range(N-1):
    a,b=list(map(int,input().split()))
    ab[a].append(b)
    ab[b].append(a)

q1=queue.Queue()
qN=queue.Queue()

dist=[None for i in range(N)]
dist[0]=1
dist[N-1]=-1

phase=1
F=0
S=0
for i in ab[1]:
    q1.put((i,phase))
    F+=1
for g in ab[N]:
    qN.put((g,phase))
    S+=1

while not (q1.empty() and qN.empty()):
    while True:
        if q1.empty():
            break
        next1,p=q1.queue[0]
        if p==phase:
            if dist[next1-1]==None:
                F+=1
                dist[next1-1]=1
            next1,p=q1.get()
            for i in ab[next1]:
                if dist[i-1]==None:
                    q1.put((i,phase+1))
        else:
            break


    while True:
        if qN.empty():
            break
        nextN,p=qN.queue[0]
        if p==phase:
            if dist[nextN-1]==None:
                S+=1
                dist[nextN-1]=-1
            nextN,p=qN.get()
            for i in ab[nextN]:
                if dist[i-1]==None:
                    qN.put((i,phase+1))
        else:
            break
    phase+=1

c=Counter(dist)
if c[-1]<c[1]:
    print("Fennec")
else:
    print("Snuke")

# Optimized solution
from collections import defaultdict,Counter
import queue

N=int(eval(input()))
ab=defaultdict(list)
for i in range(N-1):
    a,b=list(map(int,input().split()))
    ab[a].append(b)
    ab[b].append(a)

q1=queue.Queue()
qN=queue.Queue()

dist=[None for i in range(N)]
dist[0]=1
dist[N-1]=-1

phase=1
for i in ab[1]:
    q1.put((i,phase))
for g in ab[N]:
    qN.put((g,phase))

while not (q1.empty() and qN.empty()):
    while True:
        if q1.empty():
            break
        next1,p=q1.queue[0]
        if p==phase:
            if dist[next1-1]==None:
                dist[next1-1]=1
            next1,p=q1.get()
            for i in ab[next1]:
                if dist[i-1]==None:
                    q1.put((i,phase+1))
        else:
            break


    while True:
        if qN.empty():
            break
        nextN,p=qN.queue[0]
        if p==phase:
            if dist[nextN-1]==None:
                dist[nextN-1]=-1
            nextN,p=qN.get()
            for i in ab[nextN]:
                if dist[i-1]==None:
                    qN.put((i,phase+1))
        else:
            break
    phase+=1

c=Counter(dist)
if c[-1]<c[1]:
    print("Fennec")
else:
    print("Snuke")