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)

//satyaki3794
#include <bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define MOD (1000000007LL)
#define LEFT(n) (2*(n))
#define RIGHT(n) (2*(n)+1)
 
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef pair<ii, int> iii;
 
ll pwr(ll base, ll p, ll mod){
ll ans = 1;while(p){if(p&1)ans=(ans*base)%mod;base=(base*base)%mod;p/=2;}return ans;
}
 
 
ll gcd(ll a, ll b){
    if(b == 0)  return a;
    return gcd(b, a%b);
}
 
 
int n, color[100005];
set<int> adj[100005], orig[100005];
bool removed[100005];
 
 
int main(){
 
    ios_base::sync_with_stdio(0);
    cin.tie(0);
 
    cin>>n;
    if(n == 1){
    	cout<<"First";
    	return 0;
    }
 
 
    int e = n-1;
    while(e--){
 
    	int a, b;
    	cin>>a>>b;
    	adj[a].insert(b);
    	adj[b].insert(a);
 
    	orig[a].insert(b);
    	orig[b].insert(a);
    }
 
    priority_queue<ii> pq;
    for(int i=1;i<=n;i++){
    	pq.push(ii(-(int)adj[i].size(), i));
    	color[i] = -1;
    }
 
    while(!pq.empty()){
 
    	int v = pq.top().ss;
    	int deg = -pq.top().ff;
    	pq.pop();
 
// cout<<"popped "<<v<<" "<<deg<<endl; 
    	if(deg != (int)adj[v].size()){
    		pq.push(ii(-(int)adj[v].size(), v));
    		continue;
    	}

    	// assert(deg <= 1);
 
    	if(color[v] != -1){
    		continue;
    	}
 
// cout<<"retained "<<v<<" "<<deg<<endl;
 
    	if(deg == 0){
    		color[v] = 0;
    		cout<<"First";
    		return 0;
    	}
 
    	if(deg == 1){
    		int vv = (*adj[v].begin());
    		color[vv] = 0;
    		color[v] = 1;
    		for(auto it : adj[vv])
    			adj[it].erase(vv);
    		adj[v].clear();
    		adj[vv].clear();
    		continue;
    	}
 
    	// assert(0);
    }
 
// for(int i=1;i<=n;i++)	cout<<color[i]<<" ";cout<<endl;
 
    for(int i=1;i<=n;i++)
    	if(color[i] == 1)
    		for(auto vv : orig[i])
    			color[vv] = 1;
 
    for(int i=1;i<=n;i++)
    	if(color[i] == 0){
    		cout<<"First";
    		return 0;
    	}
 
    cout<<"Second";
    return 0;
}