Problem:
Score : 900 points

Problem Statement

There is a tree with N vertices numbered 1 through N.
The i-th of the N-1 edges connects vertices a_i and b_i.

Initially, each vertex is uncolored.

Takahashi and Aoki is playing a game by painting the vertices. In this game, they alternately perform the following operation, starting from Takahashi:

Select a vertex that is not painted yet.

If it is Takahashi who is performing this operation, paint the vertex white; paint it black if it is Aoki.

Then, after all the vertices are colored, the following procedure takes place:

Repaint every white vertex that is adjacent to a black vertex, in black.

Note that all such white vertices are repainted simultaneously, not one at a time.

If there are still one or more white vertices remaining, Takahashi wins; if all the vertices are now black, Aoki wins.
Determine the winner of the game, assuming that both persons play optimally.

Constraints

2 ≤ N ≤ 10^5

1 ≤ a_i,b_i ≤ N

a_i ≠ b_i

The input 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

Print First if Takahashi wins; print Second if Aoki wins.

Sample Input 1

3
1 2
2 3

Sample Output 1

First

Below is a possible progress of the game:

First, Takahashi paint vertex 2 white.

Then, Aoki paint vertex 1 black.

Lastly, Takahashi paint vertex 3 white.

In this case, the colors of vertices 1, 2 and 3 after the final procedure are black, black and white, resulting in Takahashi's victory.

Sample Input 2

4
1 2
2 3
2 4

Sample Output 2

First

Sample Input 3

6
1 2
2 3
3 4
2 5
5 6

Sample Output 3

Second

Solution in C++14 (GCC 5.4.1) (judge verdict: Wrong Answer)

#include<iostream>
#include<vector>
#include<queue>
using namespace std; // 575

const int MAX = 100000;
int main() {
	int N, a, b;
	cin >> N;
	vector<vector<int> > node(N);
	for (int i = 1;i < N;++ i) {
		cin >> a >> b;
		node[a - 1].push_back(b - 1);
		node[b - 1].push_back(a - 1);
	}
	queue<pair<int, bool> > que;
	static bool bfs[MAX];
	int black = 0;
	for (int i = 0;i < N;++ i) {
		bfs[i] = false;
		if (node[i].size() <= 1) que.push(make_pair(i, true)); // 葉
	}
	while(!que.empty()) {
		pair<int, bool> tmp = que.front();
		que.pop();
		if (bfs[tmp.first]) continue;
		bfs[tmp.first] = true;
		if (tmp.second) ++ black;
		for (int i = 0;i < node[tmp.first].size();++ i) que.push(make_pair(node[tmp.first][i], !tmp.second));
	}
	cout << (N == black << 1 ? "Second" : "First");
	return 0;
}
/*
31536000のコメント解説欄
ここテンプレで用意してるから、A問題とかだとこの先空欄の危険あり
また、コンテスト後に https://31536000.hatenablog.com/ で解説していると思うので、良かったら読んでねー

まず、白が葉から1マスだけ離れた位置を塗った場合、次に白が葉を塗ると勝ってしまうので黒は葉を塗らざるを得ない
それを全ての葉に対してやったら、今度は葉から3マス離れた位置で同様の話ができる
よって、最終的には葉から偶数距離が黒、奇数距離が白になるはず
ここで木の性質より葉から偶数距離の頂点数は必ず葉から奇数距離の頂点数以上である
同値でなければ白が多く塗り、すなわち"First"
*/