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

#pragma GCC optimize ("O3")
#include <bits/stdc++.h>
#define endl "\n"
#define sz(x) ((ll)(x).size())
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define prt(x) cout << (x)
#define prtl(x) cout << (x) << endl
#define rep(i,a,b) for(ll i=a; i<b; i++)
#define rrep(i,a,b) for(ll i=a; i>b; i--)
#define mp(a, b) make_pair(a, b)
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define debug(v) cout << #v<< ": " << v <<endl;
using namespace std;
using vi = vector<int>;
using vll = vector<long long int>;
using vb = vector<bool>;
using vvb = vector<vector<bool>>;
using vc = vector<char>;
using vvi = vector<vector<int>>;
using vvll = vector<vector<long long int>>;
using vvc = vector<vector<char>>;
using ll = long long int;
using P = pair<long long int, long long int>;
using Map = map<long long int, long long int>;
ll INF = 1LL<<60;
ll M = 1000000007;

void cnt(ll a, ll p, ll &c, const vvll &e){
    c++;
    for(auto x: e[a]){
        if(x == p){
            continue;
        }
        cnt(x, a, c, e);
    }
}

bool gl(ll a, ll p, ll g, const vvll &e){
    if(a == g){
        return true;
    }
    if(sz(e[a]) == 1){
        return false;
    }
    bool b = false;
    for(auto x: e[a]){
        if(x == p){
            continue;
        }
        if(gl(x, a, g, e)){
            b = true;
        }
    }
    return b;
}

ll cnt2(ll a, ll p, ll g, const vvll &e){
    if(a == g){
        return 0;
    }
    if(sz(e[a]) == 1&&p != INF){
        return -INF;
    }
    ll v = -INF;
    for(auto x: e[a]){
        if(x == p){
            continue;
        }
        chmax(v, cnt2(x, a, g, e));
    }
    return v+1;
}

int main(){
    ll N; cin >> N;
    vvll e(N, vll(0));
    rep(i, 0, N-1){
        ll a, b; cin >> a >> b;
        a--; b--;
        e[a].emplace_back(b);
        e[b].emplace_back(a);
    }
    ll s = 0, f = 0;
    ll n1;
    for(auto x: e[0]){
        if(gl(x, 0, N-1, e)){
            n1 = x;
        }
    }
    ll n2;
    for(auto x: e[N-1]){
        if(gl(x, N-1, 0, e)){
            n2 = x;
        }
    }
    //prt(n1); prt(" "); prt(n2);
    //prtl("1");
    for(auto x: e[0]){
        if(x == n1){
            continue;
        }
        ll v = 0;
        cnt(x, 0, v, e);
        //prtl(v);
        f += v;
    }
    for(auto x: e[N-1]){
        if(x == n2){
            continue;
        }
        ll w = 0;
        cnt(x, N-1, w, e);
        s += w;
    }
    ll c = cnt2(0, INF, N-1, e);
    c--;
    //prtl(s); prtl(f);
    //prtl(c);
    ll t = 0;
    ll x = n1, y = n2; ll p1 = 0, p2 = N-1;
}