Language: C++

#include<iostream>
#include<vector>
#include<map>
#include<set>
#include<algorithm>
#include<numeric>
#include<limits>
#include<bitset>
#include<functional>
#include<type_traits>

namespace lib
{
	template<std::uint64_t Mod>struct modnum;
	template<class T>constexpr T pow(T base, std::size_t p)
	{
		if (p == 0)
		{
			return T(1);
		}
		else if (p == 1)
		{
			return base;
		}
		else if (p == 2)
		{
			return base*base;
		}
		else if (p % 2 == 0)
		{
			return pow(pow(base, p / 2), 2);
		}
		else
		{
			return pow(pow(base, p / 2), 2)*base;
		}
	}
	template<std::uint64_t Mod>constexpr auto inverse(modnum<Mod> const&);

	template<std::uint64_t Mod>struct modnum
	{
		static constexpr auto mod = Mod;
		std::uint64_t val;
		modnum() = default;
		constexpr modnum(std::uint64_t v) :val(v%Mod)
		{

		}

		constexpr modnum& operator+=(modnum const& v)
		{
			val += v.val;
			val %= mod;
			return *this;
		}
		constexpr modnum& operator-=(modnum const& v)
		{
			val += mod - v.val;
			val %= mod;
			return *this;
		}
		constexpr modnum& operator*=(modnum const& v)
		{
			val *= v.val;
			val %= mod;
			return *this;
		}
		constexpr modnum& operator/=(modnum const& v)
		{
			return operator*=(inverse(v));
		}
	};
	template<std::uint64_t Mod>constexpr auto operator+(modnum<Mod> lhs, modnum<Mod>const& rhs)
	{
		return lhs += rhs;
	}
	template<std::uint64_t Mod>constexpr auto operator-(modnum<Mod> lhs, modnum<Mod>const& rhs)
	{
		return lhs -= rhs;
	}
	template<std::uint64_t Mod>constexpr auto operator*(modnum<Mod> lhs, modnum<Mod>const& rhs)
	{
		return lhs *= rhs;
	}
	template<std::uint64_t Mod>constexpr auto operator/(modnum<Mod> lhs, modnum<Mod>const& rhs)
	{
		return lhs /= rhs;
	}

	template<std::uint64_t Mod>constexpr auto inverse(modnum<Mod>const& base)
	{
		return pow(base, Mod - 2);
	}

	template<class T>constexpr auto clamp(T v)
	{
		return std::max(v, T());
	}
	template<class T>void sort(std::vector<T>& vec)
	{
		std::sort(vec.begin(), vec.end());
	}

	template<class T>auto lower_bound(std::vector<T>const& vec, T v)
	{
		return std::distance(vec.begin(), std::lower_bound(vec.begin(), vec.end(), v));
	}
	template<class T>auto upper_bound(std::vector<T>const& vec, T v)
	{
		return std::distance(vec.begin(), std::upper_bound(vec.begin(), vec.end(), v));
	}


	template<class Tag>struct dmod
	{
		std::uint64_t val;
		static std::uint64_t mod;
		dmod(std::uint64_t v = 0) :val(v%mod)
		{

		}
		dmod& operator+=(dmod const& rhs)
		{
			val += rhs.val;
			val %= mod;
			return *this;
		}
		dmod& operator-=(dmod const& rhs)
		{
			val += mod - rhs.val;
			val %= mod;
			return *this;
		}
		dmod& operator*=(dmod const& rhs)
		{
			val *= rhs.val;
			val %= mod;
			return *this;
		}
	};
	template<class Tag>dmod<Tag> operator+(dmod<Tag> lhs, dmod<Tag> const& rhs)
	{
		return lhs += rhs;
	}
	template<class Tag>dmod<Tag> operator-(dmod<Tag> lhs, dmod<Tag> const& rhs)
	{
		return lhs -= rhs;
	}
	template<class Tag>dmod<Tag> operator*(dmod<Tag> lhs, dmod<Tag> const& rhs)
	{
		return lhs *= rhs;
	}
	template<class Tag>std::uint64_t dmod<Tag>::mod;

	struct scope_exit
	{
		std::function<void(void)> func;
		scope_exit(std::function<void(void)> f) :func(f)
		{

		}
		~scope_exit()
		{
			func();
		}
	};

	template<int val>using int_tag = std::integral_constant<int, val>;
}

void Main();
int main()	
{
	std::cin.tie(nullptr);
	std::cin.sync_with_stdio(false);
	Main();
}

bool check(std::vector<std::set<int>>const& edge, int now, int prev, int size)
{
	if (edge[now].size() == 1 && *edge[now].begin == prev)
	{
		return size % 2 == 1;
	}
	for (auto const& v : edge[now])
	{
		if (v == prev)
		{
			continue;
		}
		if (check(edge, v, now, size + 1))
			return true;
	}
	return false;
}

void Main()
{
	int N;
	std::cin >> N;
	std::vector<int> vec(N + 1, 0);
	std::vector<std::set<int>> edge(N + 1);
	for (int i = 0; i < N - 1; ++i)
	{
		int a, b;
		std::cin >> a >> b;
		if (vec[a] == 0)
		{
			vec[a] = b;
		}
		else
		{
			vec[a] = -1;
		}
		if (vec[b] == 0)
		{
			vec[b] = a;
		}
		else
		{
			vec[b] = -1;
		}
		edge[a].emplace(b);
		edge[b].emplace(a);
	}
	for (int i = 1; i <= N; ++i)
	{
		if (vec[i] > 0)
		{
			if (check(edge, i, -1, 1))
			{
				std::cout << "First" << std::endl;
				return;
			}
		}
	}
	std::cout << "Second" << std::endl;
}

Compiler output:
a.cc:14:18: error: 'std::uint64_t' has not been declared
   14 |         template<std::uint64_t Mod>struct modnum;
      |                  ^~~
a.cc:38:18: error: 'std::uint64_t' has not been declared
   38 |         template<std::uint64_t Mod>constexpr auto inverse(modnum<Mod> const&);
      |                  ^~~
a.cc:38:66: error: 'Mod' was not declared in this scope
   38 |         template<std::uint64_t Mod>constexpr auto inverse(modnum<Mod> const&);
      |                                                                  ^~~
a.cc:38:69: error: template argument 1 is invalid
   38 |         template<std::uint64_t Mod>constexpr auto inverse(modnum<Mod> const&);
      |                                                                     ^
a.cc:40:18: error: 'std::uint64_t' has not been declared
   40 |         template<std::uint64_t Mod>struct modnum
      |                  ^~~
a.cc:73:18: error: 'std::uint64_t' has not been declared
   73 |         template<std::uint64_t Mod>constexpr auto operator+(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                  ^~~
a.cc:73:68: error: 'Mod' was not declared in this scope
   73 |         template<std::uint64_t Mod>constexpr auto operator+(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                                                                    ^~~
a.cc:73:71: error: template argument 1 is invalid
   73 |         template<std::uint64_t Mod>constexpr auto operator+(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                                                                       ^
a.cc:73:85: error: 'Mod' was not declared in this scope
   73 |         template<std::uint64_t Mod>constexpr auto operator+(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                                                                                     ^~~
a.cc:73:88: error: template argument 1 is invalid
   73 |         template<std::uint64_t Mod>constexpr auto operator+(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                                                                                        ^
a.cc:73:51: error: 'constexpr auto lib::operator+(int, const int&)' must have an argument of class or enumerated type
   73 |         template<std::uint64_t Mod>constexpr auto operator+(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                                                   ^~~~~~~~
a.cc:77:18: error: 'std::uint64_t' has not been declared
   77 |         template<std::uint64_t Mod>constexpr auto operator-(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                  ^~~
a.cc:77:68: error: 'Mod' was not declared in this scope
   77 |         template<std::uint64_t Mod>constexpr auto operator-(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                                                                    ^~~
a.cc:77:71: error: template argument 1 is invalid
   77 |         template<std::uint64_t Mod>constexpr auto operator-(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                                                                       ^
a.cc:77:85: error: 'Mod' was not declared in this scope
   77 |         template<std::uint64_t Mod>constexpr auto operator-(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                                                                                     ^~~
a.cc:77:88: error: template argument 1 is invalid
   77 |         template<std::uint64_t Mod>constexpr auto operator-(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                                                                                        ^
a.cc:77:51: error: 'constexpr auto lib::operator-(int, const int&)' must have an argument of class or enumerated type
   77 |         template<std::uint64_t Mod>constexpr auto operator-(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                                                   ^~~~~~~~
a.cc:81:18: error: 'std::uint64_t' has not been declared
   81 |         template<std::uint64_t Mod>constexpr auto operator*(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                  ^~~
a.cc:81:68: error: 'Mod' was not declared in this scope
   81 |         template<std::uint64_t Mod>constexpr auto operator*(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                                                                    ^~~
a.cc:81:71: error: template argument 1 is invalid
   81 |         template<std::uint64_t Mod>constexpr auto operator*(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                                                                       ^
a.cc:81:85: error: 'Mod' was not declared in this scope
   81 |         template<std::uint64_t Mod>constexpr auto operator*(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                                                                                     ^~~
a.cc:81:88: error: template argument 1 is invalid
   81 |         template<std::uint64_t Mod>constexpr auto operator*(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                                                                                        ^
a.cc:81:51: error: 'constexpr auto lib::operator*(int, const int&)' must have an argument of class or enumerated type
   81 |         template<std::uint64_t Mod>constexpr auto operator*(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                                                   ^~~~~~~~
a.cc:85:18: error: 'std::uint64_t' has not been declared
   85 |         template<std::uint64_t Mod>constexpr auto operator/(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                  ^~~
a.cc:85:68: error: 'Mod' was not declared in this scope
   85 |         template<std::uint64_t Mod>constexpr auto operator/(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                                                                    ^~~
a.cc:85:71: error: template argument 1 is invalid
   85 |         template<std::uint64_t Mod>constexpr auto operator/(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                                                                       ^
a.cc:85:85: error: 'Mod' was not declared in this scope
   85 |         template<std::uint64_t Mod>constexpr auto operator/(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                                                                                     ^~~
a.cc:85:88: error: template argument 1 is invalid
   85 |         template<std::uint64_t Mod>constexpr auto operator/(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                                                                                        ^
a.cc:85:51: error: 'constexpr auto lib::operator/(int, const int&)' must have an argument of class or enumerated type
   85 |         template<std::uint64_t Mod>constexpr auto operator/(modnum<Mod> lhs, modnum<Mod>const& rhs)
      |                                                   ^~~~~~~~
a.cc:90:18: error: 'std::uint64_t' has not been declared
   90 |         template<std::uint64_t Mod>constexpr auto inverse(modnum<Mod>const& base)
      |                  ^~~
a.cc:90:66: error: 'Mod' was not declared in this scope
   90 |         template<std::uint64_t Mod>constexpr auto inverse(modnum<Mod>const& base)
      |                                                                  ^~~
a.cc:90:69: error: template argument 1 is invalid
   90 |         template<std::uint64_t Mod>constexpr auto inverse(modnum<Mod>const& base)
      |                                                                     ^
a.cc: In function 'constexpr auto lib::inverse(const int&)':
a.cc:92:34: error: 'Mod' was not declared in this scope
   92 |                 return pow(base, Mod - 2);
      |                                  ^~~
a.cc: At global scope:
a.cc:116:22: error: 'uint64_t' in namespace 'std' does not name a type; did you mean 'wint_t'?
  116 |                 std::uint64_t val;
      |                      ^~~~~~~~
      |                      wint_t
a.cc:117:29: error: 'uint64_t' in namespace 'std' does not name a type; did you mean 'wint_t'?
  117 |                 static std::uint64_t mod;
      |                             ^~~~~~~~
      |                             wint_t
a.cc:118:35: error: expected ')' before 'v'
  118 |                 dmod(std::uint64_t v = 0) :val(v%mod)
      |                     ~             ^~
      |                                   )
a.cc: In member function 'lib::dmod<Tag>& lib::dmod<Tag>::operator+=(const lib::dmod<Tag>&)':
a.cc:124:25: error: 'val' was not declared in this scope
  124 |                         val += rhs.val;
      |                         ^~~
a.cc:125:32: error: 'mod' was not declared in this scope; did you mean 'dmod'?
  125 |                         val %= mod;
      |                                ^~~
      |                                dmod
a.cc: In member function 'lib::dmod<Tag>& lib::dmod<Tag>::operator-=(const lib::dmod<Tag>&)':
a.cc:130:25: error: 'val' was not declared in this scope
  130 |                         val += mod - rhs.val;
      |                         ^~~
a.cc:130:32: error: 'mod' was not declared in this scope; did you mean 'dmod'?
  130 |                         val += mod - rhs.val;
      |                                ^~~
      |                                dmod
a.cc: In member function 'lib::dmod<Tag>& lib::dmod<Tag>::operator*=(const lib::dmod<Tag>&)':
a.cc:136:25: error: 'val' was not declared in this scope
  136 |                         val *= rhs.val;
      |                         ^~~
a.cc:137:32: error: 'mod' was not declared in this scope; did you mean 'dmod'?
  137 |                         val %= mod;
      |                                ^~~
      |                                dmod
a.cc: At global scope:
a.cc:153:33: error: 'uint64_t' in namespace 'std' does not name a type; did you mean 'wint_t'?
  153 |         template<class Tag>std::uint64_t dmod<Tag>::mod;
      |                                 ^~~~~~~~
      |                                 wint_t
a.cc: In function 'bool check(const std::vector<std::set<int> >&, int, int, int)':
a.cc:181:49: error: invalid use of member function 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::begin() const [with _Key = int; _Compare = std::less<int>; _Alloc = std::alloca