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")
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")
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")

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")

-G = {} -for i in range(N - 1): +G = {i: [] for i in range(1, N + 1)} +for _ in range(N - 1): -    if a not in G: -        G[a] = [] -    if b not in G: -        G[b] = [] -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 +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") -        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") +        print("Snuke") -    print("Fennec") +    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")