stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

#define rep(i, n) for(int i = 0; i < (n); i++)

#define rep1(i, n) for(int i = 1; i <= (n); i++)

#define co(x) cout << (x) << "\n"

#define cosp(x) cout << (x) << " "

#define ce(x) cerr << (x) << "\n"

#define cesp(x) cerr << (x) << " "

#define Would

#define you

#define please



//木はdfsのほうが書くのはやいかなぁ

vector<int> eda[100001];

int kyoriF[100001];

int kyoriS[100001];



void sagasuF(int A, int B) {

	if (!kyoriF[A]) {

		kyoriF[A] = B;

		for (auto itr : eda[A]) sagasuF(itr, B + 1);

	}

}

void sagasuS(int A, int B) {

	if (!kyoriS[A]) {

		kyoriS[A] = B;

		for (auto itr : eda[A]) sagasuS(itr, B + 1);

	}

}



int main() {

	cin.tie(0);

	ios::sync_with_stdio(false);



	int N;

	cin >> N;

	rep(i, N - 1) {

		int a, b;

		cin >> a >> b;

		eda[a].push_back(b);

		eda[b].push_back(a);

	}



	sagasuF(1, 1);

	sagasuS(N, 1);



	int fen = 0;

	rep1(i, N) if (kyoriF[i] <= kyoriS[i]) fen++;



	if (fen > N - fen) co("Fennec");

	else co("Snuke");



	Would you please return 0;

}

// Faster C++ solution for the same problem (measured speedup: 19.086281945589448x):
//#include<bits/stdc++.h>

#include<cstdio>

#include<algorithm>

using namespace std;

typedef long long ll;

#define rep(i, n) for(int i = 0; i < (n); i++)

#define rep1(i, n) for(int i = 1; i <= (n); i++)

#define co(x) cout << (x) << "\n"

#define cosp(x) cout << (x) << " "

#define ce(x) cerr << (x) << "\n"

#define cesp(x) cerr << (x) << " "

#define pb push_back

#define mp make_pair

#define Would

#define you

#define please



const int cm = 1 << 17;

char cn[cm], * ci = cn + cm, ct;

inline char getcha() {

	if (ci - cn == cm) { fread(cn, 1, cm, stdin); ci = cn; }

	return *ci++;

}

inline int getint() {

	int A = 0;

	if (ci - cn + 16 > cm) while ((ct = getcha()) >= '0') A = A * 10 + ct - '0';

	else while ((ct = *ci++) >= '0') A = A * 10 + ct - '0';

	return A;

}



int N;

int E[200001], n[200001], H[100001];

int k[100001];

int D[100001];

int kyori, kotae;

int dfs(int p, int mae, int d) {

	D[p] = d;

	int kazu = 1;

	if (p == N) {

		kazu += 1 << 20;

		kyori = (D[N] + 1) / 2;

	}

	for (int i = H[p]; i; i = n[i]) if (E[i] != mae) kazu += dfs(E[i], p, d + 1);

	if (kazu > (1 << 20) && D[p] == kyori + 1) kotae = kazu - (1 << 20);

	return k[p] = kazu;

}



int main() {

	//cin.tie(0);

	//ios::sync_with_stdio(false);





	N = getint();

	int kari = 1;

	rep(i, N - 1) {

		int a = getint(), b = getint();

		E[kari] = b;

		n[kari] = H[a];

		H[a] = kari++;

		E[kari] = a;

		n[kari] = H[b];

		H[b] = kari++;

	}



	dfs(1, 0, 1);



	if (N - kotae > kotae) printf("Fennec");

	else printf("Snuke");



	Would you please return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

#define rep(i, n) for(int i = 0; i < (n); i++)

#define rep1(i, n) for(int i = 1; i <= (n); i++)

#define co(x) cout << (x) << "\n"

#define cosp(x) cout << (x) << " "

#define ce(x) cerr << (x) << "\n"

#define cesp(x) cerr << (x) << " "

#define Would

#define you

#define please



//木はdfsのほうが書くのはやいかなぁ

vector<int> eda[100001];

int kyoriF[100001];

int kyoriS[100001];



void sagasuF(int A, int B) {

	if (!kyoriF[A]) {

		kyoriF[A] = B;

		for (auto itr : eda[A]) sagasuF(itr, B + 1);

	}

}

void sagasuS(int A, int B) {

	if (!kyoriS[A]) {

		kyoriS[A] = B;

		for (auto itr : eda[A]) sagasuS(itr, B + 1);

	}

}



int main() {

	cin.tie(0);

	ios::sync_with_stdio(false);



	int N;

	cin >> N;

	rep(i, N - 1) {

		int a, b;

		cin >> a >> b;

		eda[a].push_back(b);

		eda[b].push_back(a);

	}



	sagasuF(1, 1);

	sagasuS(N, 1);



	int fen = 0;

	rep1(i, N) if (kyoriF[i] <= kyoriS[i]) fen++;



	if (fen > N - fen) co("Fennec");

	else co("Snuke");



	Would you please return 0;

}

// Faster C++ solution for the same problem (measured speedup: 19.103176008161306x):
//#include<bits/stdc++.h>

#include<cstdio>

#include<algorithm>

using namespace std;

typedef long long ll;

#define rep(i, n) for(int i = 0; i < (n); i++)

#define rep1(i, n) for(int i = 1; i <= (n); i++)

#define co(x) cout << (x) << "\n"

#define cosp(x) cout << (x) << " "

#define ce(x) cerr << (x) << "\n"

#define cesp(x) cerr << (x) << " "

#define pb push_back

#define mp make_pair

#define Would

#define you

#define please



const int cm = 1 << 17;

char cn[cm], * ci = cn + cm, ct;

inline char getcha() {

	if (ci - cn == cm) { fread_unlocked(cn, 1, cm, stdin); ci = cn; }

	return *ci++;

}

inline int getint() {

	int A = 0;

	if (ci - cn + 16 > cm) while ((ct = getcha()) >= '0') A = A * 10 + ct - '0';

	else while ((ct = *ci++) >= '0') A = A * 10 + ct - '0';

	return A;

}



int N;

int E[200001], n[200001], H[100001];

int kyori, kotae;

int dfs(int p, int mae, int d) {

	int kazu = 1;

	if (p == N) {

		kazu += 1 << 20;

		kyori = (d + 1) / 2;

	}

	for (int i = H[p]; i; i = n[i]) if (E[i] != mae) kazu += dfs(E[i], p, d + 1);

	if (kazu > (1 << 20) && d == kyori + 1) kotae = kazu - (1 << 20);

	return kazu;

}



int main() {

	//cin.tie(0);

	//ios::sync_with_stdio(false);





	N = getint();

	int kari = 1;

	rep(i, N - 1) {

		int a = getint(), b = getint();

		E[kari] = b;

		n[kari] = H[a];

		H[a] = kari++;

		E[kari] = a;

		n[kari] = H[b];

		H[b] = kari++;

	}



	dfs(1, 0, 1);



	if (N - kotae > kotae) printf("Fennec");

	else printf("Snuke");



	Would you please return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int f[100005],n,a[100005],pp[100005];

vector<int> v[100005];

queue<int> lj;

void dfs(int w,int p){

	if(pp[w])return;

	a[p]=w;pp[w]=1;

	if(w==n){

		for(int i=1;i<=p;i++)lj.push(a[i]);

		return;

	}

	for(int i=0;i<v[w].size();i++){

		dfs(v[w][i],p+1);

	}

}

int ans;

void df(int p){

	if(f[p]==2||pp[p])return;

	f[p]=1;pp[p]=1;

	ans++;

	for(int i=0;i<v[p].size();i++){

		df(v[p][i]);

	}

}

int main(){

	cin>>n;

	int x,y;

	for(int i=1;i<n;i++){

		cin>>x>>y;

		v[x].push_back(y);

		v[y].push_back(x);

	}

	dfs(1,1);

	int t=lj.size();

	for(int i=0;i<(t+1)>>1;i++){

		f[lj.front()]=1;lj.pop();

	}

	for(int i=0;i<lj.size();i++){

		f[lj.front()]=2;lj.pop();

	}

	memset(pp,0,sizeof(pp));

	df(1);

	if(ans>n/2)cout<<"Fennec";

	else cout<<"Snuke";

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.1168103051805327x):
#include <bits/stdc++.h>

using namespace std;

int n,frst,cnt[100005];

vector<int> son[100005];

vector<int> st;

void dfs(int v,int p)

{

	cnt[v]=1;

	st.push_back(v);

	if (v==n-1)

		frst=st[(st.size()+1)/2];

	for(int	i=0;i<son[v].size();i++)

	{

		int to=son[v][i];

		if (to==p)

			continue;

		dfs(to,v);

		cnt[v]+=cnt[to];

	}

	st.pop_back();

}

int main()

{

	cin>>n;

	for(int i=0;i<n-1;i++)

	{

		int a,b;

		cin>>a>>b;

		a--;b--;

		son[a].push_back(b);

		son[b].push_back(a); 

	}

	dfs(0,0);

	bool win=(cnt[frst]*2<n);

	string ans=(win?"Fennec":"Snuke");

	cout<<ans;

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int f[100005],n,a[100005],pp[100005];

vector<int> v[100005];

queue<int> lj;

void dfs(int w,int p){

	if(pp[w])return;

	a[p]=w;pp[w]=1;

	if(w==n){

		for(int i=1;i<=p;i++)lj.push(a[i]);

		return;

	}

	for(int i=0;i<v[w].size();i++){

		dfs(v[w][i],p+1);

	}

}

int ans;

void df(int p){

	if(f[p]==2||pp[p])return;

	f[p]=1;pp[p]=1;

	ans++;

	for(int i=0;i<v[p].size();i++){

		df(v[p][i]);

	}

}

int main(){

	cin>>n;

	int x,y;

	for(int i=1;i<n;i++){

		cin>>x>>y;

		v[x].push_back(y);

		v[y].push_back(x);

	}

	dfs(1,1);

	int t=lj.size();

	for(int i=0;i<(t+1)>>1;i++){

		f[lj.front()]=1;lj.pop();

	}

	for(int i=0;i<lj.size();i++){

		f[lj.front()]=2;lj.pop();

	}

	memset(pp,0,sizeof(pp));

	df(1);

	if(ans>n/2)cout<<"Fennec";

	else cout<<"Snuke";

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.1123525874817433x):
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int maxx=1e5+100;

const int INF=1e9;

const int MOD=1e9+7;

vector<int> mapp[maxx];

int vis[maxx];

int n;

int ans[5];

void dfs(int x,int y)

{

    vis[x]=1;

    vis[y]=2;

    queue<int> q;

    q.push(x);

    q.push(y);

    while(!q.empty()){

        int p=q.front();

        ans[vis[p]]++;

        q.pop();

        for(int i=0; i<mapp[p].size(); i++){

            if(vis[mapp[p][i]])   continue;

            vis[mapp[p][i]]=vis[p];

            q.push(mapp[p][i]);

        }

    }

}

int main()

{

    cin>>n;

    int a,b;

    for(int i=1; i<n; i++){

        cin>>a>>b;

        mapp[a].push_back(b);

        mapp[b].push_back(a);

    }

    dfs(1,n);

    if(ans[1]>ans[2])  cout<<"Fennec"<<endl;

    else               cout<<"Snuke"<<endl;

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int f[100005],n,a[100005],pp[100005];

vector<int> v[100005];

queue<int> lj;

void dfs(int w,int p){

	if(pp[w])return;

	a[p]=w;pp[w]=1;

	if(w==n){

		for(int i=1;i<=p;i++)lj.push(a[i]);

		return;

	}

	for(int i=0;i<v[w].size();i++){

		dfs(v[w][i],p+1);

	}

}

int ans;

void df(int p){

	if(f[p]==2||pp[p])return;

	f[p]=1;pp[p]=1;

	ans++;

	for(int i=0;i<v[p].size();i++){

		df(v[p][i]);

	}

}

int main(){

	cin>>n;

	int x,y;

	for(int i=1;i<n;i++){

		cin>>x>>y;

		v[x].push_back(y);

		v[y].push_back(x);

	}

	dfs(1,1);

	int t=lj.size();

	for(int i=0;i<(t+1)>>1;i++){

		f[lj.front()]=1;lj.pop();

	}

	for(int i=0;i<lj.size();i++){

		f[lj.front()]=2;lj.pop();

	}

	memset(pp,0,sizeof(pp));

	df(1);

	if(ans>n/2)cout<<"Fennec";

	else cout<<"Snuke";

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.1160490833562997x):
#include<iostream>

#include<cstdio>

#include<algorithm>

#include<vector>

#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)

#define foreach(c,itr) for(__typeof((c).begin()) itr=(c).begin();itr!=(c).end();itr++)

using namespace std;



vector<int> node[100007];

int id;

int dist[2][100007];



void dfs(int idx,int par=-1)

{

	if(~par)dist[id][idx]=dist[id][par]+1;

	for(int i=0;i<node[idx].size();i++)

	{

		if(node[idx][i]!=par)dfs(node[idx][i],idx);

	}

}



int main()

{

	int n;

	cin>>n;

	REP(i,n-1)

	{

		int u,v;

		cin>>u>>v;

		--u,--v;

		node[u].push_back(v);

		node[v].push_back(u);	

	}

	id=0;

	dfs(0);

	id=1;

	dfs(n-1);

	int cnt=0;

	for(int i=0;i<n;i++)

	{

		if(dist[0][i]<=dist[1][i])cnt++;

	}

	cout<<(cnt>=(n+2)/2?"Fennec":"Snuke");

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int f[100005],n,a[100005],pp[100005];

vector<int> v[100005];

queue<int> lj;

void dfs(int w,int p){

	if(pp[w])return;

	a[p]=w;pp[w]=1;

	if(w==n){

		for(int i=1;i<=p;i++)lj.push(a[i]);

		return;

	}

	for(int i=0;i<v[w].size();i++){

		dfs(v[w][i],p+1);

	}

}

int ans;

void df(int p){

	if(f[p]==2||pp[p])return;

	f[p]=1;pp[p]=1;

	ans++;

	for(int i=0;i<v[p].size();i++){

		df(v[p][i]);

	}

}

int main(){

	cin>>n;

	int x,y;

	for(int i=1;i<n;i++){

		cin>>x>>y;

		v[x].push_back(y);

		v[y].push_back(x);

	}

	dfs(1,1);

	int t=lj.size();

	for(int i=0;i<(t+1)>>1;i++){

		f[lj.front()]=1;lj.pop();

	}

	for(int i=0;i<lj.size();i++){

		f[lj.front()]=2;lj.pop();

	}

	memset(pp,0,sizeof(pp));

	df(1);

	if(ans>n/2)cout<<"Fennec";

	else cout<<"Snuke";

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.1158009221568366x):
//#include<bits/stdc++.h>

//using namespace std;

//int dis[100005];

//int n;

//vector<int>vec[100005];

//void dfs(int i)

//{

//	dis[i]=1;

//	for(int j=0;j<vec[i].size();j++)

//		if(dis[vec[i][j]]==0)

//		{

//			dfs(vec[i][j]);

//			dis[i]+=dis[vec[i][j]];

//		}

//}

//vector<int>ans;

//bool vis[100005],ok;

//void dfs2(int x)

//{

//	vis[x]=1;

//	if(!ok)ans.push_back(x);

//	if(x==n)

//	{

//		ok=1;

//		return;

//	}

//	for(int i=0;i<vec[x].size();i++)

//		if(!vis[vec[x][i]])

//			dfs2(vec[x][i]);

//	if(!ok)ans.pop_back();

//}

//int main()

//{

//	cin>>n;

//	for(int i=0;i<n-1;i++)

//	{

//		int x,y;

//		cin>>x>>y;

//		vec[x].push_back(y);

//		vec[y].push_back(x);

//	}

//	dfs(1);

////	for(int i=1;i<=n;i++)

////		cout<<dis[i]<<' ';

////	cout<<endl;

//	dfs2(1);

//	int x=ans[(ans.size()+1)/2];

////	for(int i=0;i<ans.size();i++)

////		cout<<ans[i]<<' ';

////	cout<<endl;

//	x=dis[x];

//	if(x>=n-x)cout<<"Snuke";

//	else cout<<"Fennec";

//	return 0;

//}



#include<bits/stdc++.h>

using namespace std;

int n,p[100005],sz[100005],cnt1,col[100005];

vector<int>vec[100005];

void dfs(int x)

{

	sz[x]=1;

	for(int i=0;i<vec[x].size();i++)

	{

		if(vec[x][i]!=p[x])

		{

			p[vec[x][i]]=x;

			dfs(vec[x][i]);

			sz[x]+=sz[vec[x][i]];

		}

	}

}

void dfs2(int x)

{

	cnt1++;

	for(int i=0;i<vec[x].size();i++)

		if(vec[x][i]!=p[x]&&col[vec[x][i]]==0)

			dfs2(vec[x][i]);

}

int main()

{

	cin>>n;

	for(int i=0;i<n-1;i++)

	{

		int x,y;

		cin>>x>>y;

		vec[x].push_back(y);

		vec[y].push_back(x);

	}

	dfs(1);

	vector<int>path;

	int c=n;

	while(c>0)

	{

		path.push_back(c);

		c=p[c];

	}

	reverse(path.begin(),path.end());

//	int l=0,r=0;

//	int i=0,j=path.size()-1;

//	while(i<=j)

//	{

//		l+=path[i++];

//		if(i<=j)r+=path[j--];

//	}

//	if(l>r)cout<<"Fennec";

//	else cout<<"Snuke";

	for(int i=(path.size()+1)/2;i<path.size();i++)

		col[path[i]]=1;

//	for(int i=0;i<path.size();i++)

//		cout<<path[i]<<' ';

//	cout<<endl;

//	for(int i=1;i<=n;i++)

//		cout<<col[i]<<' ';

//	cout<<endl;

	dfs2(1);

	int cnt2=n-cnt1;

//	cout<<cnt1<<' '<<cnt2<<endl;

	if(cnt1>cnt2)cout<<"Fennec";

	else cout<<"Snuke";

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int f[100005],n,a[100005],pp[100005];

vector<int> v[100005];

queue<int> lj;

void dfs(int w,int p){

	if(pp[w])return;

	a[p]=w;pp[w]=1;

	if(w==n){

		for(int i=1;i<=p;i++)lj.push(a[i]);

		return;

	}

	for(int i=0;i<v[w].size();i++){

		dfs(v[w][i],p+1);

	}

}

int ans;

void df(int p){

	if(f[p]==2||pp[p])return;

	f[p]=1;pp[p]=1;

	ans++;

	for(int i=0;i<v[p].size();i++){

		df(v[p][i]);

	}

}

int main(){

	cin>>n;

	int x,y;

	for(int i=1;i<n;i++){

		cin>>x>>y;

		v[x].push_back(y);

		v[y].push_back(x);

	}

	dfs(1,1);

	int t=lj.size();

	for(int i=0;i<(t+1)>>1;i++){

		f[lj.front()]=1;lj.pop();

	}

	for(int i=0;i<lj.size();i++){

		f[lj.front()]=2;lj.pop();

	}

	memset(pp,0,sizeof(pp));

	df(1);

	if(ans>n/2)cout<<"Fennec";

	else cout<<"Snuke";

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.1197889654931779x):
#include<iostream>

#include<algorithm>

#include<stdio.h>

#include<cstdio>

#include<vector>

using namespace std;

bool flag=false;

vector<int> v[100005];

vector<int> way;

bool vis[100005];

bool visited[100005];

int n;

int m;

int l;

int r;

bool dfs_find_way(int a){

    vis[a]=true;

    way.push_back(a);

    if(a==n){

        return true;

    }

    for(int i=0;i<v[a].size();i++){

        if(!vis[v[a][i]]){

            if(dfs_find_way(v[a][i])){

                return true;

            }

        }

    }

    way.pop_back();

    return false;

}

int dfs_get_ans(int a,int num=0){

    visited[a]=true;

    for(int i=0;i<v[a].size();i++){

        if(!visited[v[a][i]]){

            num=dfs_get_ans(v[a][i],num+1);

        }

    }

    return num;

}

int main(){

    cin>>n;

    m=n-1;

    for(int i=0;i<m;i++){

        int x,y;

        cin>>x>>y;

        v[x].push_back(y);

        v[y].push_back(x);

    }

    dfs_find_way(1);

    for(int i=0;i<way.size();i++){

        visited[way[i]]=true;

    }

    for(int i=0;i<(way.size()+1)/2;i++){

        l+=dfs_get_ans(way[i],0);

    }

    for(int i=(way.size()+1)/2;i<way.size();i++){

        r+=dfs_get_ans(way[i],0);

    }

    if(l>r){

        puts("Fennec");

        return 0;

    }

    else if(l<r){

        puts("Snuke");

        return 0;

    }

    else{

        if(way.size()%2==0){

            puts("Snuke");

            return 0;

        }

        else{

            puts("Fennec");

            return 0;

        }

    }

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int f[100005],n,a[100005],pp[100005];

vector<int> v[100005];

queue<int> lj;

void dfs(int w,int p){

	if(pp[w])return;

	a[p]=w;pp[w]=1;

	if(w==n){

		for(int i=1;i<=p;i++)lj.push(a[i]);

		return;

	}

	for(int i=0;i<v[w].size();i++){

		dfs(v[w][i],p+1);

	}

}

int ans;

void df(int p){

	if(f[p]==2||pp[p])return;

	f[p]=1;pp[p]=1;

	ans++;

	for(int i=0;i<v[p].size();i++){

		df(v[p][i]);

	}

}

int main(){

	cin>>n;

	int x,y;

	for(int i=1;i<n;i++){

		cin>>x>>y;

		v[x].push_back(y);

		v[y].push_back(x);

	}

	dfs(1,1);

	int t=lj.size();

	for(int i=0;i<(t+1)>>1;i++){

		f[lj.front()]=1;lj.pop();

	}

	for(int i=0;i<lj.size();i++){

		f[lj.front()]=2;lj.pop();

	}

	memset(pp,0,sizeof(pp));

	df(1);

	if(ans>n/2)cout<<"Fennec";

	else cout<<"Snuke";

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.1199490944847574x):
#include<bits/stdc++.h>

#define ri register int

using namespace std;

int n,f[2][100005],k,x,y,fen;

vector<int>g[100005];

void dfs(int u,int fa){

    f[k][u]=f[k][fa]+1;

    for(ri i=0;i<g[u].size();++i)

    if(g[u][i]!=fa)dfs(g[u][i],u);

}int main(){

    scanf("%d",&n);

    for(ri i=1;i<n;++i){

        scanf("%d%d",&x,&y);

        g[x].push_back(y);

        g[y].push_back(x);

    }k=0;dfs(1,0);k=1;dfs(n,0);

    for(ri i=1;i<=n;++i)

    if(f[0][i]<=f[1][i])++fen;

	if(fen>n/2)puts("Fennec");

    else puts("Snuke");

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;





int us[200005],n,m=0,c[200005],a1=0,a2=0;

vector<int>e[100005];

void dfs(int v,int l)

{

    int i;

    if(v==n)

    {

        m=l;

        return ;

    }

    for(i=0;i<e[v].size();i++)

    {

        if(us[e[v][i]]==0)

        {

            us[e[v][i]]=1;

            dfs(e[v][i],l+1);

        }

        if(m>0)

        {

            if(l<=m/2)

            {

                c[v]=1;

            }

            else

            {

                c[v]=-1;

            }

            return ;

        }

    }

}

void dfs1(int v)

{

    if(c[v]==-1)

    {

        return ;

    }

    a1++;

    for(int i=0;i<e[v].size();i++)

    {

        if(us[e[v][i]]==0)

        {

            us[e[v][i]]=1;

            dfs1(e[v][i]);

        }

    }

}

void dfs2(int v)

{

    if(c[v]==1)

    {

        return ;

    }

    a2++;

    for(int i=0;i<e[v].size();i++)

    {

        if(us[e[v][i]]==0)

        {

            us[e[v][i]]=1;

            dfs2(e[v][i]);

        }

    }

}

int main()

{

    int i,a,b;

    scanf("%d",&n);

    for(i=0;i<n-1;i++)

    {

        scanf("%d %d",&a,&b);

        e[a].push_back(b);

        e[b].push_back(a);

    }

    c[1]=1;

    c[n]=-1;

    dfs(1,0);

    us[1]=1;

    memset(us,0,sizeof(us));

    dfs1(1);

    us[1]=1;

    memset(us,0,sizeof(us));

    dfs2(n);

    us[1]=1;

    if(a1>a2)

    {

        printf("Fennec\n");

    }

    else

    {

        printf("Snuke\n");

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.2588529457950073x):
#include <bits/stdc++.h>

using namespace std;



int N;

vector<int> g[100000];

int dist[2][100000], id;



void dfs(int idx, int par=-1){

	if(~par) dist[id][idx] = dist[id][par]+1;

	for(int j=0; j<g[idx].size(); j++) if(g[idx][j]!=par) dfs(g[idx][j], idx);

}



int main(){

	cin >> N;

	for(int i=0; i<N-1; i++){

		int a, b;

		cin >> a >> b;

		--a,--b;

		g[a].push_back(b);

		g[b].push_back(a);

	}

	id = 0;

	dfs(0);

	id = 1;

	dfs(N-1);

	

	int ret=0;

	for(int i=0; i<N; i++){

		if(dist[0][i]<=dist[1][i]) ++ret;

	}

	if(ret>=(N+2)/2) cout << "Fennec";

	else cout << "Snuke";

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;





int us[200005],n,m=0,c[200005],a1=0,a2=0;

vector<int>e[100005];

void dfs(int v,int l)

{

    int i;

    if(v==n)

    {

        m=l;

        return ;

    }

    for(i=0;i<e[v].size();i++)

    {

        if(us[e[v][i]]==0)

        {

            us[e[v][i]]=1;

            dfs(e[v][i],l+1);

        }

        if(m>0)

        {

            if(l<=m/2)

            {

                c[v]=1;

            }

            else

            {

                c[v]=-1;

            }

            return ;

        }

    }

}

void dfs1(int v)

{

    if(c[v]==-1)

    {

        return ;

    }

    a1++;

    for(int i=0;i<e[v].size();i++)

    {

        if(us[e[v][i]]==0)

        {

            us[e[v][i]]=1;

            dfs1(e[v][i]);

        }

    }

}

void dfs2(int v)

{

    if(c[v]==1)

    {

        return ;

    }

    a2++;

    for(int i=0;i<e[v].size();i++)

    {

        if(us[e[v][i]]==0)

        {

            us[e[v][i]]=1;

            dfs2(e[v][i]);

        }

    }

}

int main()

{

    int i,a,b;

    scanf("%d",&n);

    for(i=0;i<n-1;i++)

    {

        scanf("%d %d",&a,&b);

        e[a].push_back(b);

        e[b].push_back(a);

    }

    c[1]=1;

    c[n]=-1;

    dfs(1,0);

    us[1]=1;

    memset(us,0,sizeof(us));

    dfs1(1);

    us[1]=1;

    memset(us,0,sizeof(us));

    dfs2(n);

    us[1]=1;

    if(a1>a2)

    {

        printf("Fennec\n");

    }

    else

    {

        printf("Snuke\n");

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.2575072506420937x):
// luogu-judger-enable-o2

#include <bits/stdc++.h>

using namespace std;

int N;

const int M=1e5+10;

vector<int> g[M];

int dist[2][M],id;

void dfs(int now,int past=-1) {

	if(past!=-1) dist[id][now]=dist[id][past]+1;

	for(int i=0;i!=g[now].size();i++) if(g[now][i]!=past) dfs(g[now][i],now);

}

int main() {

	cin>>N;

	for(int i=0;i<N-1;i++) {

		int a,b;

		cin>>a>>b;

		a--;b--;

		g[a].push_back(b);

		g[b].push_back(a);

	}

	id=0;

	dfs(0);

	id=1;

	dfs(N-1);

	int ret=0;

	for(int i=0;i<N;i++) {

		if(dist[0][i]<=dist[1][i]) ret++;

	}

	if(ret>=(N+2)/2) cout<<"Fennec"<<endl;

	else cout<<"Snuke"<<endl;

	return 0;

}