CodeEff/ECCO huggingface dataset:
# Original solution
#067-D
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(eval(input()))
def S(): return eval(input())

n=I()
prev=[-1 for i in range(n)]
nl=[[] for i in range(n)]
q=[0]
vis=[False for i in range(n)]

for i in range(n-1):
    a,b=IL()
    nl[a-1].append(b-1)
    nl[b-1].append(a-1)

while len(q)!=0:
    s=q.pop(0)
    vis[s]=True
    for v in nl[s]:
        if not vis[v]:
            prev[v]=s
            q.append(v)

path=[n-1]
while True:
    if path[-1]==0:
        break
    path.append(prev[path[-1]])
path.reverse()
    
for i in range(1,n):
    while True:
        if prev[i] in path:
            break
        prev[i]=prev[prev[i]]

if len(path)%2==0:
    fenp=path[:len(path)//2]
    fen=len(path)//2
else:
    fenp=path[:len(path)//2+1]
    fen=len(path)//2+1

snu=len(path)-fen

r=list(range(n))
for i in path:
    r.remove(i)
for i in r:
    if prev[i] in fenp:
        fen+=1
    else:
        snu+=1

        
if fen>snu:
    print("Fennec")
else:
    print("Snuke")

# Optimized solution
#067-D
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(eval(input()))
def S(): return eval(input())

n=I()
nl=[[] for i in range(n)]
distfen=[-1 for i in range(n)]
distsnu=[-1 for i in range(n)]

for i in range(n-1):
    a,b=IL()
    nl[a-1].append(b-1)
    nl[b-1].append(a-1)
    
q=[[0,0]]
vis=[False for i in range(n)]
while len(q)!=0:
    s,d=q.pop(0)
    vis[s]=True
    for v in nl[s]:
        if not vis[v]:
            distfen[v]=d+1
            q.append([v,d+1])

q=[[n-1,0]]
vis=[False for i in range(n)]
while len(q)!=0:
    s,d=q.pop(0)
    vis[s]=True
    for v in nl[s]:
        if not vis[v]:
            distsnu[v]=d+1
            q.append([v,d+1])
        
fen=0
snu=0

for i in range(1,n-1):
    if distfen[i]<=distsnu[i]:
        fen+=1
    else:
        snu+=1

if fen>snu:
    print("Fennec")
else:
    print("Snuke")
# Original solution
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)


N = int(eval(input()))
G = [[] for _ in range(N)]
for _ in range(N-1):
    a, b = [int(x)-1 for x in input().split()]
    G[a].append(b)
    G[b].append(a)
visited = [False] * N
visited[0] = True


def dfs(v):
    if v == N-1:
        return [N-1]
    for u in G[v]:
        if visited[u]:
            continue
        visited[u] = True
        ret = dfs(u)
        visited[u] = False
        if ret:
            return [v] + ret
    return None


path = dfs(0)
l = len(path)
u, v = 0, 0
if l % 2 == 0:
    u = path[l//2-1]
    v = path[l//2]
else:
    u = path[l//2]
    v = path[l//2+1]
G[u].remove(v)
G[v].remove(u)


def dfs2(v):
    global fen
    fen += 1
    for u in G[v]:
        if visited[u]:
            continue
        visited[u] = True
        dfs2(u)
        visited[u] = False


fen = 0
dfs2(0)
if fen > N // 2:
    print('Fennec')
else:
    print('Snuke')


# Optimized solution
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)


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


def dfs(v, dist):
    for u in G[v]:
        if dist[u] != -1:
            continue
        dist[u] = dist[v] + 1
        ret = dfs(u, dist)


dist_fen = [-1] * N
dist_fen[0] = 0
dfs(0, dist_fen)

dist_snu = [-1] * N
dist_snu[N-1] = 0
dfs(N-1, dist_snu)

fen = 0
for v in range(N):
    if dist_fen[v] <= dist_snu[v]:
        fen += 1
if fen > N // 2:
    print('Fennec')
else:
    print('Snuke')
# Original solution
from collections import defaultdict
import queue
N = int(eval(input()))
edge = defaultdict(list)
for i in range(N-1):
    a,b = list(map(int,input().split()))
    edge[a].append(b)
    edge[b].append(a)

def bfs(s):
    dist = defaultdict(lambda:float('inf'))
    dist[s] = 0
    que = queue.Queue()
    que.put(s)
    while que.qsize():
        s = que.get()
        for t in edge[s]:
            if dist[t] > dist[s] + 1:
                dist[t] = dist[s] + 1
                que.put(t)
    return dist

fdist = bfs(1)
sdist = bfs(N)
f = 0
for i in range(1,N+1):
    if fdist[i] <= sdist[i]:
        f += 1
s = N-f
if f > s:
    print('Fennec')
else:
    print('Snuke')


# Optimized solution
from collections import defaultdict
from heapq import heappop, heappush
from math import ceil

class Graph(object):

    def __init__(self):
        self.graph = defaultdict(list)

    def __len__(self):
        return len(self.graph)

    def add_edge(self, From, To, cost=1):
        self.graph[From].append((To,cost))

    def get_nodes(self):
        return list(self.graph.keys())

class Dijkstra(object):

    def __init__(self, graph, start):
        self.g = graph.graph
        self.dist = defaultdict(lambda:float('inf'))
        self.dist[start] = 0
        self.prev = defaultdict(lambda: None)
        self.Q = []
        heappush(self.Q,(self.dist[start], start))

        while  self.Q:
            dist_u, u = heappop(self.Q)
            if self.dist[u] < dist_u:
                continue
            for v, cost in self.g[u]:
                alt = dist_u + cost
                if self.dist[v] > alt:
                    self.dist[v] = alt
                    self.prev[v] = u
                    heappush(self.Q,(alt, v))

    def shortest_distance(self, goal):
        return self.dist[goal]

    def shortest_path(self, goal):
        path = []
        node = goal
        while node is not None:
            path.append(node)
            node = self.prev[node]

        return path[::-1]

N = int(eval(input()))
g = Graph()

for _ in range(N-1):
    a,b = list(map(int,input().split()))
    g.add_edge(a,b)
    g.add_edge(b,a)

dij = Dijkstra(g,1)
path = dij.shortest_path(N)
c1 = path[ceil(len(path)/2)-1]
c2 = path[ceil(len(path)/2)]

g.graph[c1] = [(to,cost) for to,cost in g.graph[c1] if to != c2]
g.graph[c2] = [(to,cost) for to,cost in g.graph[c2] if to != c1]

dij = Dijkstra(g,1)
f = 0
for i in range(1,N):
    if dij.shortest_distance(i) != float('inf'):
        f += 1
if f > N-f:
    print('Fennec')
else:
    print('Snuke')
# Original solution
from collections import defaultdict
from heapq import heappop, heappush
from math import ceil

class Graph(object):

    def __init__(self):
        self.graph = defaultdict(list)

    def __len__(self):
        return len(self.graph)

    def add_edge(self, From, To, cost=1):
        self.graph[From].append((To,cost))

    def get_nodes(self):
        return list(self.graph.keys())

class Dijkstra(object):

    def __init__(self, graph, start):
        self.g = graph.graph
        self.dist = defaultdict(lambda:float('inf'))
        self.dist[start] = 0
        self.prev = defaultdict(lambda: None)
        self.Q = []
        heappush(self.Q,(self.dist[start], start))

        while  self.Q:
            dist_u, u = heappop(self.Q)
            if self.dist[u] < dist_u:
                continue
            for v, cost in self.g[u]:
                alt = dist_u + cost
                if self.dist[v] > alt:
                    self.dist[v] = alt
                    self.prev[v] = u
                    heappush(self.Q,(alt, v))

    def shortest_distance(self, goal):
        return self.dist[goal]

    def shortest_path(self, goal):
        path = []
        node = goal
        while node is not None:
            path.append(node)
            node = self.prev[node]

        return path[::-1]

N = int(eval(input()))
g = Graph()

for _ in range(N-1):
    a,b = list(map(int,input().split()))
    g.add_edge(a,b)
    g.add_edge(b,a)

dij = Dijkstra(g,1)
path = dij.shortest_path(N)
c1 = path[ceil(len(path)/2)-1]
c2 = path[ceil(len(path)/2)]

g.graph[c1] = [(to,cost) for to,cost in g.graph[c1] if to != c2]
g.graph[c2] = [(to,cost) for to,cost in g.graph[c2] if to != c1]

dij = Dijkstra(g,1)
f = 0
for i in range(1,N):
    if dij.shortest_distance(i) != float('inf'):
        f += 1
if f > N-f:
    print('Fennec')
else:
    print('Snuke')

# Optimized solution
from heapq import heappush, heappop
def dijkstra(graph:list, node:int, start:int) -> list:
    # graph[node] = [(cost, to)]
    inf = float('inf')
    dist = [inf]*node

    dist[start] = 0
    heap = [(0,start)]
    while heap:
        cost,thisNode = heappop(heap)
        for NextCost,NextNode in graph[thisNode]:
            dist_cand = dist[thisNode]+NextCost
            if dist_cand < dist[NextNode]:
                dist[NextNode] = dist_cand
                heappush(heap,(dist[NextNode],NextNode))
    return dist

N = int(eval(input()))
g = [[] for _ in range(N)]

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

df = dijkstra(g,N,0)
ds = dijkstra(g,N,N-1)

f = 0
for i in range(N):
    if df[i] <= ds[i]:
        f += 1
if f > N-f:
    print('Fennec')
else:
    print('Snuke')
# Original solution
import sys
input=sys.stdin.readline
N=int(eval(input()))
from collections import defaultdict
from collections import deque
branch=defaultdict(set)
for i in range(N-1):
    a,b=list(map(int,input().split()))
    branch[a]|={b,}
    branch[b]|={a,}
brack=[float('inf')]*(N+1)
brack[1]=0
check=deque([(1,{1,N})])
while len(check)>0:
    now=check.popleft()
    for i in branch[now[0]]:
        if i in now[1]:
            continue
        brack[i]=brack[now[0]]+1
        check.append((i,now[1]|{i,}))
white=[float('inf')]*(N+1)
white[N]=0
check=deque([(N,{N,1}),])
while len(check)>0:
    now=check.popleft()
    for i in branch[now[0]]:
        if i in now[1]:
            continue
        white[i]=white[now[0]]+1
        check.append((i,now[1]|{i,}))
fennec=0
snuke=0
for i in range(1,N+1):
    if brack[i]<=white[i]:fennec+=1
    elif brack[i]>white[i]:snuke+=1
if fennec>snuke:print('Fennec')
elif fennec<=snuke:print('Snuke')

# Optimized solution
import sys
input=sys.stdin.readline
N=int(eval(input()))
from collections import defaultdict
from collections import deque
branch=defaultdict(set)
for i in range(N-1):
    a,b=list(map(int,input().split()))
    branch[a]|={b,}
    branch[b]|={a,}
brack=[float('inf')]*(N+1)
brack[1]=0
brack[N]=0
check=deque([1])
while len(check)>0:
    now=check.popleft()
    for i in branch[now]:
        if brack[i]>10**9:
            brack[i]=brack[now]+1
            check.append(i)
white=[float('inf')]*(N+1)
white[N]=0
white[1]=0
check=deque([N])
while len(check)>0:
    now=check.popleft()
    for i in branch[now]:
        if white[i]>10**9:
            white[i]=white[now]+1
            check.append(i)
brack[N]=float('inf')
white[1]=float('inf')
fennec=0
snuke=0
for i in range(1,N+1):
    if brack[i]<=white[i]:fennec+=1
    elif brack[i]>white[i]:snuke+=1
if fennec>snuke:print('Fennec')
elif fennec<=snuke:print('Snuke')
# Original solution
n = int(eval(input()))
g = [set() for _ in range(n)]
for i in range(n-1):
    a, b = list(map(int, input().split()))
    g[a-1].add(b-1)
    g[b-1].add(a-1)


def dfs(s, e, flag):
    visited = [-1]*n
    visited[0] = 0
    cnt = 1
    if flag: temp = [[s, [[0]]]]
    else: temp = [[s]]
    lst = []
    while temp:
        p = temp.pop()
        for a in g[p[0]]:
            if flag: q = p[1][:]
            if visited[a] != -1:continue
            visited[a] = visited[p[0]] + 1
            if flag: q.append([a])
            if a == e:
                lst = q[:]
                return lst
            if flag: temp.append([a, q])
            else: temp.append([a])
            cnt += 1
    return cnt

lst = dfs(0, n-1, True)

m = (len(lst) - 1) // 2
g[lst[m][0]].discard(lst[m+1][0])
g[lst[m+1][0]].discard(lst[m][0])

c0 = dfs(0, n-1, False)

if c0 > n - c0: print('Fennec')
else:print('Snuke')

# Optimized solution
n = int(eval(input()))
g = [set() for _ in range(n)]
for i in range(n-1):
    a, b = list(map(int, input().split()))
    g[a-1].add(b-1)
    g[b-1].add(a-1)

def dfs(s):
    visited = [-1]*n
    visited[s] = 0
    temp = [s]
    lst = []
    while temp:
        p = temp.pop()
        for a in g[p]:
            if visited[a] != -1:continue
            visited[a] = visited[p] + 1
            temp.append(a)
    return visited

lst0 = dfs(0)
lstn = dfs(n-1)
cnt = 0
for i in range(n):
    if lst0[i] <= lstn[i]: cnt += 1

if cnt > n - cnt: print('Fennec')
else:print('Snuke')
# Original solution
#!/usr/bin/env python3
#ABC67 D

import sys
import math
import bisect
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7

n = int(eval(input()))
g = [[] for _ in range(n)]
w = [[float('inf')]*n for _ in range(n)]
for _ in range(n-1):
    a,b = list(map(int,input().split()))
    g[a-1].append(b-1)
    g[b-1].append(a-1)
    w[a-1][b-1] = 1
    w[b-1][a-1] = 1

def dijkstra(s,n,w):
    dist = [float('inf')]*n
    used = [False]*n
    dist[s] = 0
    while 1:
        v = -1
        for i in range(n):
            if not used[i] and v == -1:
                v = i
            elif not used[i] and dist[i] < dist[v]:
                v = i
        if v == -1:
            break
        used[v] = True

        for j in range(n):
            dist[j] = min(dist[j],dist[v] + w[v][j])
    return dist

white,black = 0,0
for i in range(n):
    d = dijkstra(i,n,w)
    if d[0] <= d[n-1]:
        black += 1
    else:
        white += 1
if black > white:
    print('Fennec')
else:
    print('Snuke')


# Optimized solution
#!/usr/bin/env python3
#ABC67 D

import sys
import math
import bisect
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7

n = int(eval(input()))
g = [[] for _ in range(n)]
w = [[float('inf')]*n for _ in range(n)]
for _ in range(n-1):
    a,b = list(map(int,input().split()))
    g[a-1].append(b-1)
    g[b-1].append(a-1)
    w[a-1][b-1] = 1
    w[b-1][a-1] = 1

def dijkstra(s,n,w):
    dist = [float('inf')]*n
    used = [False]*n
    dist[s] = 0
    while 1:
        v = -1
        for i in range(n):
            if not used[i] and v == -1:
                v = i
            elif not used[i] and dist[i] < dist[v]:
                v = i
        if v == -1:
            break
        used[v] = True

        for j in range(n):
            dist[j] = min(dist[j],dist[v] + w[v][j])
    return dist

white,black = 0,0
d1 = dijkstra(0,n,w)
d2 = dijkstra(n-1,n,w)
for i in range(n):
    if d1[i] <= d2[i]:
        black += 1
    else:
        white += 1
if black > white:
    print('Fennec')
else:
    print('Snuke')
# Original solution
import sys
sys.setrecursionlimit(10**7)

def tree(p):
    for x in neighbor[p]:
        if x==par[p]: continue
        par[x]=p
        descend[p]+=tree(x)
    return descend[p]

n=int(eval(input()))
neighbor=[set()  for _ in range(n+1)]
descend=[1]*(n+1)
par=[0]*(n+1)

for _ in range(n-1):
    a,b=list(map(int,input().split()))
    neighbor[a].add(b)
    neighbor[b].add(a)
tree(1)

x=[descend[n]-1]
t=n
while t!=1:
    t,pret=par[t],t
    x.append(descend[t]-descend[pret]-1)

l=len(x)
p,q=sum(x[:l//2]),sum(x[l//2:])
if l%2==0: print(("Fennec" if p<q else "Snuke"))
else: print(("Fennec" if p<=q else "Snuke"))

# Optimized solution
import sys
sys.setrecursionlimit(10**7)

def tree(p):
    for x in neighbor[p]:
        if x==par[p]: continue
        par[x]=p
        descend[p]+=tree(x)
    return descend[p]

n=int(eval(input()))
neighbor=[[]  for _ in range(n+1)]
descend=[1]*(n+1)
par=[0]*(n+1)

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

x=[descend[n]-1]
t=n
while t!=1:
    t,pret=par[t],t
    x.append(descend[t]-descend[pret]-1)

l=len(x)
p,q=sum(x[:l//2]),sum(x[l//2:])
if l%2==0: print(("Fennec" if p<q else "Snuke"))
else: print(("Fennec" if p<=q else "Snuke"))
# Original solution
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from collections import deque
N=int(eval(input()))

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

def dfs_init(u,ls):
  global path
  visited[u]=True  
  if u==N:
    path=ls
    return
  
  for v in graph[u]:
    if not visited[v]:
      dfs_init(v,ls+[v])
  
path=[]  
visited=[False]*(N+1)
dfs_init(1,[1])
#print(path)

visited=[False]*(N+1)
set_f=set()
set_s=set()
turn=1
dq=deque(path)
while dq:
  #Fenec
  node_f=dq.popleft()
  visited[node_f]=True
  set_f.add(node_f)
  turn=-1
  
  if dq:
    #Snuke
    node_s=dq.pop()
    visited[node_s]=True
    set_s.add(node_s)
    turn=1
#print(set_f,set_s,visited,turn)

def dfs_fenec(u):
  global cnt_f
  if not visited[u]:
    visited[u]=True
    cnt_f+=1
  for v in graph[u]:
    if not visited[v]:
      dfs_fenec(v)

def dfs_snuke(u):
  global cnt_s
  if not visited[u]:
    visited[u]=True
    cnt_s+=1
  for v in graph[u]:
    if not visited[v]:
      dfs_snuke(v)
      
#fenec
cnt_f=0
for f in set_f:
  dfs_fenec(f)
  
#snuke
cnt_s=0
for s in set_s:
  dfs_snuke(s)
  
#print(cnt_f,cnt_s)
if turn==1:
  if cnt_f>cnt_s:
    print("Fennec")
  else:
    print("Snuke")
elif turn==-1:
  if cnt_f>=cnt_s:
    print("Fennec")
  else:
    print("Snuke")

# Optimized solution
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from collections import deque
N=int(eval(input()))

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

dist_f=[-1]*(N+1)
d=0
queue=[1]
while queue:  
  new_queue=set()
  for u in queue:
    dist_f[u]=d
    for v in graph[u]:
      if dist_f[v]==-1:
        new_queue.add(v)
        
  queue=list(new_queue)
  d+=1
#print(dist_f)

dist_s=[-1]*(N+1)
d=0
queue=[N]
while queue:  
  new_queue=set()
  for u in queue:
    dist_s[u]=d
    for v in graph[u]:
      if dist_s[v]==-1:
        new_queue.add(v)
        
  queue=list(new_queue)
  d+=1
#print(dist_s)

cnt_f,cnt_s=0,0
for i in range(1,N+1):
  if dist_f[i]<=dist_s[i]:
    cnt_f+=1
  else:
    cnt_s+=1

#print(cnt_f,cnt_s)
if cnt_f>cnt_s:
  print("Fennec")
else:
  print("Snuke")
# Original solution
N = int(eval(input()))
G = [[] for _ in range(N)]
visited = [0]*N
visited[0],visited[N-1] = 1,1
visited_all = [1]*N
for i in range(N-1):
    a,b = list(map(int,input().split()))
    G[a-1].append(b-1)
    G[b-1].append(a-1)
nextA,nextB = G[0],G[N-1]
scoreA,scoreB = 1,1
while visited != visited_all:
    l = []
    for a in nextA:
        if visited[a] == 0:
            visited[a] = 1
            scoreA += 1
            for x in G[a]:
                l.append(x)
    nextA = l
    l = []
    for b in nextB:
        if visited[b] == 0:
            visited[b] = 1
            scoreB += 1
            for x in G[b]:
                l.append(x)
    nextB = l
print(("Fennec" if scoreA > scoreB else "Snuke"))


# Optimized solution
N = int(eval(input()))
A = [[] for _ in range(N)]
for i in range(N-1):
    a,b = list(map(int,input().split()))
    A[a-1].append(b-1)
    A[b-1].append(a-1)

B = [False]*N
visited = [True]*N

Fp,Sp = 0,0
Fi,Si = [0],[N-1]

while B != visited:
    # Fennec
    nextXi = []
    for i in Fi:
        if not B[i]:
            B[i] = True
            Fp += 1
            nextXi.extend(A[i])
    Fi = nextXi
    # Snuke
    nextXi = []
    for i in Si:
        if not B[i]:
            B[i] = True
            Sp += 1
            nextXi.extend(A[i])
    Si = nextXi

print(("Fennec" if Fp>Sp else "Snuke"))
# Original solution
import sys
sys.setrecursionlimit(10**6)
    
def main():
    N = int(eval(input()))
    d = {}
    for _ in range(N-1):
        a, b = list(map(int, input().split()))
        if a in d:
            d[a].append(b)
        else:
            d[a] = [b]
        if b in d:
            d[b].append(a)
        else:
            d[b] = [a]
    v = set()
    v.add(1)
    def dfs(n):
        if n == N:
            return True, [N]
        for i in d[n]:
            if i not in v:
                v.add(i)
                t, l = dfs(i)
                if t:
                    return True, l + [n]
        return False, n
    _, l = dfs(1)
    l.reverse()
    v = set()
    if len(l) % 2 == 0:
        half = len(l) // 2 - 1
    else:
        half = len(l) // 2
    v.add(l[half])
    s = l[half+1]
    v.add(s)
    def dfs2(n):
        r = 1
        for i in d[n]:
            if i not in v:
                v.add(i)
                r += dfs2(i)
        return r
    x = dfs2(s)
    if N - x > x:
        return 'Fennec'
    else:
        return 'Snuke'
print((main()))


# Optimized solution
import sys
sys.setrecursionlimit(10**6)
    
def main():
    N = int(eval(input()))
    d = {}
    for _ in range(N-1):
        a, b = list(map(int, input().split()))
        if a in d:
            d[a].append(b)
        else:
            d[a] = [b]
        if b in d:
            d[b].append(a)
        else:
            d[b] = [a]
    v = set()
    v.add(1)
    l = []
    def dfs(n):
        if n == N:
            l.append(n)
            return True
        for i in d[n]:
            if i not in v:
                v.add(i)
                if dfs(i):
                    l.append(n)
                    return True
        return False
    dfs(1)
    l.reverse()
    v = set()
    if len(l) % 2 == 0:
        half = len(l) // 2 - 1
    else:
        half = len(l) // 2
    v.add(l[half])
    s = l[half+1]
    v.add(s)
    def dfs2(n):
        r = 1
        for i in d[n]:
            if i not in v:
                v.add(i)
                r += dfs2(i)
        return r
    x = dfs2(s)
    if N - x > x:
        return 'Fennec'
    else:
        return 'Snuke'
print((main()))
# Original solution
import sys
sys.setrecursionlimit(1000000)
N=int(eval(input()))
ab=[[] for _ in range(N)]
for _ in range(N-1):
  a,b=list(map(int,input().split()))
  ab[a-1].append(b)
  ab[b-1].append(a)


def dfs(pre,p,pa):
  global path
  if p==N:
    path=pa
  else:
    for i in ab[p-1]:
      if i!=pre:
        dfs(p,i,pa+[i])

dfs(-1,1,[1])
spath=set(path)

def dfs2(pre,p):
  a=0
  for i in ab[p-1]:
    if i in spath:
      pass
    elif i==pre:
      pass
    else:
      a+=dfs2(p,i)
  return 1+a

ff=0
sf=0
L=len(path)
for i in range(L):
  if i<=(L-1)//2:
    ff+=dfs2(-1,path[i])
  else:
    sf+=dfs2(-1,path[i])
    
if ff>sf:
  print("Fennec")
else:
  print("Snuke")


# Optimized solution
import sys
sys.setrecursionlimit(1000000)
N=int(eval(input()))
ab=[[] for _ in range(N)]
for _ in range(N-1):
  a,b=list(map(int,input().split()))
  ab[a-1].append(b)
  ab[b-1].append(a)
"""
N=10**5
ab=[[]]*N
ab[0]=[2]
ab[N-1]=[N-1]
for i in range(1,N-1):
  ab[i]=[i,i+2]
"""
par=[0]*N
  
def dfs(pre,p):
  global path
  par[p-1]=pre
  if p==N:
    pass
  else:
    for i in ab[p-1]:
      if i!=pre:
        dfs(p,i)

dfs(-1,1)
path=[N]
p=N
while p!=1:
  p=par[p-1]
  path.append(p)
path.reverse()

spath=set(path)

def dfs2(pre,p):
  a=0
  for i in ab[p-1]:
    if i in spath:
      pass
    elif i==pre:
      pass
    else:
      a+=dfs2(p,i)
  return 1+a

ff=0
sf=0
L=len(path)
for i in range(L):
  if i<=(L-1)//2:
    ff+=dfs2(-1,path[i])
  else:
    sf+=dfs2(-1,path[i])
    
if ff>sf:
  print("Fennec")
else:
  print("Snuke")