def d_fennec_vs_snuke(N, E):  # N:マスの個数, E:道の情報

    # 隣接リストの作成

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

    for a, b in E:

        a -= 1

        b -= 1

        edge[a].append(b)

        edge[b].append(a)



    # 幅優先探索

    def bfs(N, adjacent, V):

        # 木のある頂点Vからの距離を求める

        dist = [0 for i in range(N)]  # 頂点Vからの距離

        isVisit = [False for i in range(N)]  # ある頂点が探索済か

        queue = [V - 1]  # 幅探索用キュー(配列が0-indexedのため-1する)

        isVisit[V - 1] = True



        while queue:

            u = queue.pop()

            for p in adjacent[u]:

                if not isVisit[p]:

                    isVisit[p] = True

                    dist[p] = dist[u] + 1

                    queue.append(p)

        return dist



    fennec_dist = bfs(N, edge, 1)  # フェネック(頂点1スタート)から各頂点の距離

    snuke_dist = bfs(N, edge, N)  # すぬけ(頂点Nスタート)

    fennec_point, snuke_point = 0, 0  # 自分が色を塗れたマスの数



    for idx in range(N):

        if fennec_dist[idx] <= snuke_dist[idx]:

            fennec_point += 1

        else:

            snuke_point += 1

    if fennec_point > snuke_point:

        return 'Fennec'

    else:

        return 'Snuke'

    return None

N = int(eval(input()))

E = [[int(i) for i in input().split()] for j in range(N-1)]

print((d_fennec_vs_snuke(N, E)))
def d_fennec_vs_snuke():

    from collections import deque

    N = int(eval(input()))

    Edges = [[int(i) for i in input().split()] for j in range(N - 1)]



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

    for a, b in Edges:

        graph[a - 1].append(b - 1)

        graph[b - 1].append(a - 1)



    def bfs(start, tree_size=N, tree=graph):

        """木のある頂点 start からの距離を求める (start は 0-origin)"""

        dist = [0] * tree_size

        is_visited = [False] * tree_size

        is_visited[start] = True



        queue = deque([start])

        while queue:

            current = queue.pop()

            for child in tree[current]:

                if is_visited[child]:

                    continue

                is_visited[child] = True

                dist[child] = dist[current] + 1

                queue.appendleft(child)

        return dist



    fennec_dist, snuke_dist = bfs(0), bfs(N - 1)

    fennec_point, snuke_point = 0, 0  # 各々が色を塗れたマスの数



    for fennec, snuke in zip(fennec_dist, snuke_dist):

        if fennec <= snuke:

            fennec_point += 1

        else:

            snuke_point += 1

    return 'Fennec' if fennec_point > snuke_point else 'Snuke'



print((d_fennec_vs_snuke()))
def d_fennec_vs_snuke(N, E):  # N:マスの個数, E:道の情報
    # 隣接リストの作成
    edge = [[] for _ in range(N)]
    for a, b in E:
        a -= 1
        b -= 1
        edge[a].append(b)
        edge[b].append(a)
    # 幅優先探索
    def bfs(N, adjacent, V):
        # 木のある頂点Vからの距離を求める
        dist = [0 for i in range(N)]  # 頂点Vからの距離
        isVisit = [False for i in range(N)]  # ある頂点が探索済か
        queue = [V - 1]  # 幅探索用キュー(配列が0-indexedのため-1する)
        isVisit[V - 1] = True
        while queue:
            u = queue.pop()
            for p in adjacent[u]:
                if not isVisit[p]:
                    isVisit[p] = True
                    dist[p] = dist[u] + 1
                    queue.append(p)
        return dist

    fennec_dist = bfs(N, edge, 1)  # フェネック(頂点1スタート)から各頂点の距離
    snuke_dist = bfs(N, edge, N)  # すぬけ(頂点Nスタート)
    fennec_point, snuke_point = 0, 0  # 自分が色を塗れたマスの数
    for idx in range(N):
        if fennec_dist[idx] <= snuke_dist[idx]:
            fennec_point += 1
        else:
            snuke_point += 1
    if fennec_point > snuke_point:
        return "Fennec"
    else:
        return "Snuke"
    return None


N = int(eval(input()))
E = [[int(i) for i in input().split()] for j in range(N - 1)]
print((d_fennec_vs_snuke(N, E)))

def d_fennec_vs_snuke():
    from collections import deque

    N = int(eval(input()))
    Edges = [[int(i) for i in input().split()] for j in range(N - 1)]
    graph = [[] for _ in range(N)]
    for a, b in Edges:
        graph[a - 1].append(b - 1)
        graph[b - 1].append(a - 1)

    def bfs(start, tree_size=N, tree=graph):
        """木のある頂点 start からの距離を求める (start は 0-origin)"""
        dist = [0] * tree_size
        is_visited = [False] * tree_size
        is_visited[start] = True
        queue = deque([start])
        while queue:
            current = queue.pop()
            for child in tree[current]:
                if is_visited[child]:
                    continue
                is_visited[child] = True
                dist[child] = dist[current] + 1
                queue.appendleft(child)
        return dist

    fennec_dist, snuke_dist = bfs(0), bfs(N - 1)
    fennec_point, snuke_point = 0, 0  # 各々が色を塗れたマスの数
    for fennec, snuke in zip(fennec_dist, snuke_dist):
        if fennec <= snuke:
            fennec_point += 1
        else:
            snuke_point += 1
    return "Fennec" if fennec_point > snuke_point else "Snuke"


print((d_fennec_vs_snuke()))

-def d_fennec_vs_snuke(N, E):  # N:マスの個数, E:道の情報 -    # 隣接リストの作成 -    edge = [[] for _ in range(N)] -    for a, b in E: -        a -= 1 -        b -= 1 -        edge[a].append(b) -        edge[b].append(a) -    # 幅優先探索 -    def bfs(N, adjacent, V): -        # 木のある頂点Vからの距離を求める -        dist = [0 for i in range(N)]  # 頂点Vからの距離 -        isVisit = [False for i in range(N)]  # ある頂点が探索済か -        queue = [V - 1]  # 幅探索用キュー(配列が0-indexedのため-1する) -        isVisit[V - 1] = True +def d_fennec_vs_snuke(): +    from collections import deque + +    N = int(eval(input())) +    Edges = [[int(i) for i in input().split()] for j in range(N - 1)] +    graph = [[] for _ in range(N)] +    for a, b in Edges: +        graph[a - 1].append(b - 1) +        graph[b - 1].append(a - 1) + +    def bfs(start, tree_size=N, tree=graph): +        """木のある頂点 start からの距離を求める (start は 0-origin)""" +        dist = [0] * tree_size +        is_visited = [False] * tree_size +        is_visited[start] = True +        queue = deque([start]) -            u = queue.pop() -            for p in adjacent[u]: -                if not isVisit[p]: -                    isVisit[p] = True -                    dist[p] = dist[u] + 1 -                    queue.append(p) +            current = queue.pop() +            for child in tree[current]: +                if is_visited[child]: +                    continue +                is_visited[child] = True +                dist[child] = dist[current] + 1 +                queue.appendleft(child) -    fennec_dist = bfs(N, edge, 1)  # フェネック(頂点1スタート)から各頂点の距離 -    snuke_dist = bfs(N, edge, N)  # すぬけ(頂点Nスタート) -    fennec_point, snuke_point = 0, 0  # 自分が色を塗れたマスの数 -    for idx in range(N): -        if fennec_dist[idx] <= snuke_dist[idx]: +    fennec_dist, snuke_dist = bfs(0), bfs(N - 1) +    fennec_point, snuke_point = 0, 0  # 各々が色を塗れたマスの数 +    for fennec, snuke in zip(fennec_dist, snuke_dist): +        if fennec <= snuke: -    if fennec_point > snuke_point: -        return "Fennec" -    else: -        return "Snuke" -    return None +    return "Fennec" if fennec_point > snuke_point else "Snuke" -N = int(eval(input())) -E = [[int(i) for i in input().split()] for j in range(N - 1)] -print((d_fennec_vs_snuke(N, E))) +print((d_fennec_vs_snuke()))