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<map>
#include<set>
#include<vector>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
typedef long long ll;
typedef long double ld;
#define ft first
#define sd second
#define pb push_back
#define mp make_pair
#define sz(a) ((int)(a).size())
#define pii pair<int,int>
#define R(a) scanf("%d",&a)
#define per(i,a,b) for(int i=a;i>=int(b);i--)
#define rep(i,a,b) for(int i=a;i<=int(b);i++)
#define rix(i,x) for(int i=last[x];i;i=pre[i])
const double eps=1e-8;
int sgn(double x){return x<-eps?-1:x>eps;}
int Mn(int&a,int b){if(a>b){a=b;return 1;}return 0;}
int Mx(int&a,int b){if(a<b){a=b;return 1;}return 0;}
ll gcd(ll a,ll b){return a==0?b:gcd(b%a,a);}
ll inv(ll a,ll b){return a==1?1:(1-b*inv(b%a,a))/a;}
ll exg(ll a,ll b,int&x,int&y){!a?x=0,y=1:(exg(b%a,a,y,x),x-=b/a*y);}
ll pow(ll a,ll b,ll M) {ll t=1;for(a%=M;b;b>>=1){if(b&1)t=t*a%M;a=a*a%M;}return t;}
const int N=1e5+5;
vector<int>a[N];
int n,c[N],b[N],fg;
int dfs(int x,int dep,int s,int fa){
	c[x]=1;int cnt=0,p=0;
	rep(i,0,sz(a[x])-1){
		int y=a[x][i];
		if(a[x][i]==fa)continue;
		dfs(a[x][i],dep+1,s&&(sz(a[x])==1||sz(a[x])==2&&x!=1),x);
		if(c[y]>0){
			if(c[y]%2==1)cnt++;
			p++;if(p==1)c[x]=c[y]+1;else c[x]=0;
		}
	}
	if(x==1)fg|=cnt>=2;else fg|=(cnt+(s&&dep%2))>=2;
}
int main()
{
	cin>>n;rep(i,1,n-1){
		int x,y;R(x);R(y);
		a[x].pb(y);a[y].pb(x);
		b[x]++;b[y]++;
	}
	/*int fg=0;rep(x,1,n){
		int cnt=0;
		rep(i,0,sz(a[x])-1)
			if(b[a[x][i]]==1)cnt++;
		if(cnt>=2)fg=1;
	}*/
	dfs(1,0,1,0);
	if(fg>0)puts("First");else puts("Second");
}