Problem:
Score : 400 points

Problem Statement

Fennec and Snuke are playing a board game.

On the board, there are N cells numbered 1 through N, and N-1 roads, each connecting two cells. Cell a_i is adjacent to Cell b_i through the i-th road. Every cell can be reached from every other cell by repeatedly traveling to an adjacent cell. In terms of graph theory, the graph formed by the cells and the roads is a tree.

Initially, Cell 1 is painted black, and Cell N is painted white. The other cells are not yet colored.
Fennec (who goes first) and Snuke (who goes second) alternately paint an uncolored cell.
More specifically, each player performs the following action in her/his turn:

Fennec: selects an uncolored cell that is adjacent to a black cell, and paints it black.

Snuke: selects an uncolored cell that is adjacent to a white cell, and paints it white.

A player loses when she/he cannot paint a cell. Determine the winner of the game when Fennec and Snuke play optimally.

Constraints

2 \leq N \leq 10^5

1 \leq a_i, b_i \leq N

The given graph is a tree.

Input

Input is given from Standard Input in the following format:

N
a_1 b_1
:
a_{N-1} b_{N-1}

Output

If Fennec wins, print Fennec; if Snuke wins, print Snuke.

Sample Input 1

7
3 6
1 2
3 1
7 4
5 7
1 4

Sample Output 1

Fennec

For example, if Fennec first paints Cell 2 black, she will win regardless of Snuke's moves.

Sample Input 2

4
1 4
4 2
2 3

Sample Output 2

Snuke

Solution in C# (Mono 4.6.2.0) (judge verdict: Wrong Answer)

using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace ConsoleApplication1.CodeForces
{
    class _4032
    {
        private static int Next()
        {
            int c;
            int res = 0;
            do
            {
                c = reader.Read();
                if (c == -1)
                    return res;
            } while (c < '0' || c > '9');
            res = c - '0';
            while (true)
            {
                c = reader.Read();
                if (c < '0' || c > '9')
                    return res;
                res *= 10;
                res += c - '0';
            }
        }
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024 * 10), Encoding.ASCII, false, 1024 * 10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024 * 10), Encoding.ASCII, 1024 * 10);

        class Node
        {
            public long Current { get; set; }
            public int Number { get; set; }
        }
        public static string ReverseString(string s)
        {
            char[] arr = s.ToCharArray();
            Array.Reverse(arr);
            return new string(arr);
        }
        static void Main(String[] args)
        {
            var n = int.Parse(Console.ReadLine().TrimEnd());
            var edges = new List<int>[n];
            for(var i = 0; i < n; i++)
            {
                edges[i] = new List<int>();
            }
            for(var i = 0; i < n - 1; i++)
            {
                var data = Console.ReadLine().TrimEnd().Split(' ').Select(a => int.Parse(a)-1).ToList();
                edges[data[0]].Add(data[1]);
                edges[data[1]].Add(data[0]);
            }

            var que = new Queue<Node>();
            que.Enqueue(new Node()
            {
                Current = 0,
                Number = 0
            });

            var visited = new bool[n];
            visited[0] = true;

            var numberbetww = 0;
            var totalFrom1 = 0;
            while(que.Count > 0)
            {
                var cur = que.Dequeue();
                if (cur.Current == n - 1)
                {
                    numberbetww = cur.Number-1;
                    continue;
                }
                totalFrom1++;
                for (var i = 0; i < edges[cur.Current].Count; i++)
                {
                    var ind = edges[cur.Current][i];

                    if (!visited[ind])
                    {
                        visited[ind] = true;
                        que.Enqueue(new Node()
                        {
                            Current = ind,
                            Number = cur.Number + 1
                        });
                    }
                }
            }
            totalFrom1 -= numberbetww/2;
            var totalFrom2 = n - totalFrom1 - numberbetww + numberbetww/2;
            if(totalFrom1 >= totalFrom2)
            {
                Console.WriteLine("Fennec");
            } else
            {
                Console.WriteLine("Snuke");
            }
        }
    }
}