Language: C++

#include <bits/stdc++.h>
using namespace std;
#define FOR(i, n) for(int i = 0; i < (n); i++)
#define MEM(a, x) memset(a, x, sizeof(a))
#define ALL(a) a.begin(), a.end()
#define UNIQUE(a) a.erase(unique(ALL(a)), a.end())
typedef long long ll;

int n;
vector<int> g[100005];
// int dis[100005];
int prev[100005], c[100005];
bool used[100005];

void setDis(int from) {
	FOR(i, g[from].size()) {
		int v = g[from][i];
		if (used[v]) continue;
		prev[v] = from;
		// dis[v] = dis[from]+1;
		used[v] = true;
		setDis(v);
	}
	return;
}

vector<int> get_path(int t) {
	vector<int> path;
	for (; t != -1; t = prev[t]) path.push_back(t);
	reverse(path.begin(), path.end());
	return path;
}

void dfs(int from) {
	FOR(i, g[from].size()) {
		int v = g[from][i];
		if (used[v]) continue;
		if (c[v] == 0) c[v] = c[from];
		used[v] = true;
		dfs(v);
	}
}

int main(int argc, char const *argv[]) {
	ios_base::sync_with_stdio(false);
	cin >> n;
	FOR(i, n-1) {
		int a, b;
		cin >> a >> b;
		a--;
		b--;
		g[a].push_back(b);
		g[b].push_back(a);
	}
	// dis[0] = 0;
	used[0] = true;
	fill(prev, prev+n, -1);
	setDis(0);
	vector<int> path = get_path(n-1);
	// FOR(i, path.size()) {
	// 	cout << path[i] << endl;
	// }
	fill(c, c+n, 0);
	FOR(i, path.size()) {
		if (i < (path.size()+1)/2) c[path[i]] = 1;
		else c[path[i]] = -1;
	}
	// FOR(i, n) cout << c[i] << endl;
	fill(used, used+n, false);
	used[0] = true;
	dfs(0);
	int cnt = 0;
	FOR(i, n) {
		if (c[i] > 0) cnt++;
	}
	if (cnt >= (n+1)/2) cout << "Fennec" << endl;
	else cout << "Snuke" << endl;


	return 0;
}

Compiler output:
a.cc: In function 'void setDis(int)':
a.cc:19:17: error: reference to 'prev' is ambiguous
   19 |                 prev[v] = from;
      |                 ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:66,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:244:5: note: candidates are: 'template<class _BidirectionalIterator> constexpr _BidirectionalIterator std::prev(_BidirectionalIterator, typename iterator_traits<_Iter>::difference_type)'
  244 |     prev(_BidirectionalIterator __x, typename
      |     ^~~~
a.cc:12:5: note:                 'int prev [100005]'
   12 | int prev[100005], c[100005];
      |     ^~~~
a.cc: In function 'std::vector<int> get_path(int)':
a.cc:29:29: error: reference to 'prev' is ambiguous
   29 |         for (; t != -1; t = prev[t]) path.push_back(t);
      |                             ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:244:5: note: candidates are: 'template<class _BidirectionalIterator> constexpr _BidirectionalIterator std::prev(_BidirectionalIterator, typename iterator_traits<_Iter>::difference_type)'
  244 |     prev(_BidirectionalIterator __x, typename
      |     ^~~~
a.cc:12:5: note:                 'int prev [100005]'
   12 | int prev[100005], c[100005];
      |     ^~~~
a.cc: In function 'int main(int, const char**)':
a.cc:57:14: error: reference to 'prev' is ambiguous
   57 |         fill(prev, prev+n, -1);
      |              ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:244:5: note: candidates are: 'template<class _BidirectionalIterator> constexpr _BidirectionalIterator std::prev(_BidirectionalIterator, typename iterator_traits<_Iter>::difference_type)'
  244 |     prev(_BidirectionalIterator __x, typename
      |     ^~~~
a.cc:12:5: note:                 'int prev [100005]'
   12 | int prev[100005], c[100005];
      |     ^~~~
a.cc:57:20: error: reference to 'prev' is ambiguous
   57 |         fill(prev, prev+n, -1);
      |                    ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:244:5: note: candidates are: 'template<class _BidirectionalIterator> constexpr _BidirectionalIterator std::prev(_BidirectionalIterator, typename iterator_traits<_Iter>::difference_type)'
  244 |     prev(_BidirectionalIterator __x, typename
      |     ^~~~
a.cc:12:5: note:                 'int prev [100005]'
   12 | int prev[100005], c[100005];
      |     ^~~~