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 <bits/stdc++.h>
using namespace std;
#define ll long long
#define For(n) for(int i = 0; i < n; i++)
#define FOR(i, r, k) for(int i = r; i < k; i ++)
#define pb push_back
#define X first
#define Y second
#define mp make_pair
const ll maxn = 1e5 + 244;
const ll mod = 1e9 + 7;
const ll inf = 1e18 + 500;
ll l[maxn];
bool b[maxn];
vector < ll > g[maxn];
int d[maxn];
int main()
{
    ll n, m;
    cin >> n;
    m = n - 1;
    For(m)
    {
        int u, v;
        cin >> u >> v;
        g[u].pb(v);
        g[v].pb(u);
    }
    if(n & 1)
    {
        cout << "First";
        return 0;
    }
    For(n)
    {
        if(g[i + 1].size() == 1)
        {
            b[i + 1] = 1;
        }
    }
    For(n)
    {
        int x = 0;
        for(int j = 0; j < g[i + 1].size(); j++)
        {
            if(b[g[i + 1][j]])
                x ++;
            d[i + 1] ++;
        }
        if(x >= 2)
        {
            cout << "First";
            return 0;
        }
    }
    // momkene first she:)
    sort(d + 1, d + n + 1);
    int res = 0;
    for(int i = 1; i <= n; i++)
    {
        if(i & 1)
            res += d[i];
    }
    if(res < n / 2)
    {
        cout << "First";
        return 0;
    }
    res = 0;
    for(int i = 1; i <= n; i++)
    {
        if(i <= n / 2)
            res += d[i];
    }
    if(res >= n / 2) cout << "Second";
    else cout << "ame";
    return 0;
}