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++14 (GCC 5.4.1) (judge verdict: Wrong Answer)

#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<string>
#include<stack>
#include<queue>
#include<vector>
#include<algorithm>
#include<iomanip>
#include<utility>
typedef long long int ll;
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) for(int i=0;i<signed(n);i++)
#define EREP(i,n) for(int i=1;i<=signed(n);i++)
#define ALL(a) (a).begin(),(a).end()
using std::cout;
using std::vector;
using std::endl;
using std::cin;
//#define EVEL 1
#ifdef EVEL
#define DEB(X) cout << #X << ":" <<X<<" " ;
#define TF(f) f ? cout<<"true  " : cout<<"false ";
#define END cout<<"\n";
#else
#define DEB(X) {}
#define TF(f) {}
#define END {}
#endif
const int MOD = 1000000007;
const ll INF = 50000000000000000;
typedef std::pair<int,int> P;
struct edge {int to,cost;};
    ll N;
    //N 辺の数 V

    vector<edge> G[100001];
    ll d[100001];
    ll f[100001];
    ll ans=0;
    void dijkstra(int s){
        std::priority_queue<P,vector<P>,std::greater<P>> que;
        std::fill(d,d+N,INF);
        d[s]=0;
        que.push(P(0,s));
        while(!que.empty()){

            P p =que.top();que.pop();
            int v=p.second;
            if(d[v]<p.first)continue;
            for(int i=0;i<(signed)G[v].size();i++){
                edge e =G[v][i];
                if(d[e.to]>d[v]+e.cost){
                    d[e.to]=d[v]+e.cost;
                    que.push(P(d[e.to],e.to));
                }
            }
        }
    }
    void dijkstra1(int s){
        std::priority_queue<P,vector<P>,std::greater<P>> que;
        std::fill(f,f+N,INF);
        f[s]=0;
        que.push(P(0,s));
        while(!que.empty()){

            P p =que.top();que.pop();
            int v=p.second;
            if(f[v]<p.first)continue;
            for(int i=0;i<(signed)G[v].size();i++){
                edge e =G[v][i];
                if(f[e.to]>f[v]+e.cost){
                    f[e.to]=f[v]+e.cost;
                    que.push(P(f[e.to],e.to));
                }
            }
        }
    }



int main(){
    std::ios_base::sync_with_stdio(false);
    cin>>N;
    REP(i,N-1){
        //DEB(i) END
        int a,b;
        cin>>a>>b;
        edge es;
        es.to=b-1,es.cost=1;
        G[a-1].push_back(es);
        es.to=a-1;
        G[b-1].push_back(es);
    }
    dijkstra1(0);
    dijkstra(N-1);
    REP(i,N){
        if(f[i]>=d[i])ans++;
    }
    ans>N-ans?cout<<"Fennec":cout<<"Snuke";
    return 0;
}

//ARC 078 D - Fennec VS. Snuke