#include<bits/stdc++.h>

using namespace std;

vector<int>adj[100005];
int subnodes[100005];
int parent[100005];
bool visited[100005];
int n;
int a,b;

void dfs(int u){
    bool leaf = true;
    visited[u] = true;
    for(int v : adj[u]){
        if(!visited[v]){
            parent[v] = u;
            leaf = false;
            dfs(v);
        }
    }
    for(int v : adj[u]){
        subnodes[u] += subnodes[v];
    }
    subnodes[u]++;
}

bool ans(){
    int node = n - 1;
    queue<int> path;
    while(node != 0){
        path.push(node);
        node = parent[node];
    }
    path.push(0);
    int len = path.size(), fennec = len/2;
    node = n - 1;
    int i = len;
    parent[0] = -1;
    while(i >= 0){
        for(int v : adj[node]){
            if(parent[v] != node && v != path.front()){
                if(i <= fennec){
                    a += subnodes[v];
                }else{
                    b += subnodes[v];
                }
            }
        }
        i--;
        node = parent[node];
    }
    cout << '\n' << a << ' ' << b << '\n';
    if(len%2){
        return a > b;
    }else{
        return a >= b;
    }
}

int main(){
    cin>>n;

    for(int i=0;i<n-1;i++){
        cin>>a>>b;
        adj[a-1].push_back(b-1);
        adj[b-1].push_back(a-1);
    }
    dfs(0);
    for(int i = 0; i < n ; i++){
        cout << subnodes[i] << ' ';
    }
    if(ans()){
            cout << "Fennec";
    }else{
        cout << "Snuke";
    }


}
