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 Rust (1.15.1) (judge verdict: Runtime Error)

// This code is generated by [cargo-atcoder](https://github.com/tanakh/cargo-atcoder)
// Original source code:
/*
use proconio::input;
use proconio::marker::Usize1;

fn adjacency_list(n: usize, ab: &Vec<(usize, usize)>) -> Vec<Vec<usize>> {
    let mut e = vec![vec![]; n];
    for &(a, b) in ab.iter() {
        e[a].push(b);
        e[b].push(a);
    }
    e
}

fn dfs(e: &Vec<Vec<usize>>, u: usize, p: usize, t: usize) -> Result<usize, Vec<usize>> {
    if u == t {
        return Err(vec![]);
    }
    let mut c = 1;
    for &v in e[u].iter() {
        if v == p {
            continue;
        }
        match dfs(e, v, u, t) {
            Ok(c_v) => c += c_v,
            Err(mut v) => {
                v.push(u);
                return Err(v);
            }
        }
    }
    Ok(c)
}

fn dfs2(e: &Vec<Vec<usize>>, u: usize, p: usize, v_b: usize, v_w: usize) -> usize {
    let mut c = 1;
    for &v in e[u].iter() {
        if v == p || v == v_b || v == v_w {
            continue;
        }
        c += dfs2(e, v, u, v_b, v_w);
    }
    c
}

fn main() {
    input! {
        n: usize,
        ab: [(Usize1, Usize1); n - 1],
    };

    let e = adjacency_list(n, &ab);

    let mut us = vec![];
    let mut c_b = 1;
    for &v in e[0].iter() {
        match dfs(&e, v, 0, n - 1) {
            Ok(c) => c_b += c,
            Err(s) => us = s,
        }
    }
    us.push(n - 1);
    if us.len() > 2 {
        let mut v_b = 0;
        for w in us[1..(us.len() - 2) / 2].windows(2) {
            match w {
                &[u, v_w] => {
                    c_b += dfs2(&e, u, u, v_b, v_w);
                    v_b = u;
                }
                _ => unreachable!(),
            }
        }
    }

    let c_w = n - c_b;
    let ans = if c_b > c_w { "Fennec" } else { "Snuke" };
    println!("{}", ans);
}
*/

fn main() {
    let exe = "/tmp/bin4E016694";
    std::io::Write::write_all(&mut std::fs::File::create(exe).unwrap(), &decode(BIN)).unwrap();
    std::fs::set_permissions(exe, std::os::unix::fs::PermissionsExt::from_mode(0o755)).unwrap();
    std::process::exit(std::process::Command::new(exe).status().unwrap().code().unwrap())
}

fn decode(v: &str) -> Vec<u8> {
    let mut ret = vec![];
    let mut buf = 0;
    let mut tbl = vec![64; 256];
    for i in 0..64 { tbl[TBL[i] as usize] = i as u8; }
    for (i, c) in v.bytes().filter_map(|c| { let c = tbl[c as usize]; if c < 64 { Some(c) } else { None } }).enumerate() {
        match i % 4 {
            0 => buf = c << 2,
            1 => { ret.push(buf | c >> 4); buf = c << 4; }
            2 => { ret.push(buf | c >> 2); buf = c << 6; }
            3 => ret.push(buf | c),
            _ => unreachable!(),
        }
    }
    ret
}

const TBL: &'static [u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
const BIN: &'static str = "<base64-encoded ELF executable removed>";