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 (Clang 3.8.0) (judge verdict: Wrong Answer)

#include<algorithm>
#include<cmath>
#include<iomanip>
#include<iostream>
#include<map>
#include<numeric>
#include<queue>
#include<set>
#include<sstream>
#include<vector>
using namespace std;
using uint = unsigned int;
using ll = long long;
const int M = 1e9 + 7;
const ll MLL = 1e18L + 9;
#pragma unused(M)
#pragma unused(MLL)
#ifdef LOCAL
#include"rprint.hpp"
#else
template <class... T> void printl(T&&...){ }
template <class... T> void printc(T&&...){ }
template <class... T> void prints(T&&...){ }
template <class... T> void printd(T&&...){ }
template <class... T> void printArr(T&&...){ }
#endif

int none = 0, black = 1, white = 2;
struct Node{
    vector<Node*> dests;
    int color = none;
    bool valid = true;
    void add(Node* n){
        dests.push_back(n);
    }
    void add2(Node* n){
        add(n);
        n->add(this);
    }
    void dfs(Node* from = nullptr){
        for(Node* d : dests){
            if(d == from){ continue; }
            d -> dfs(this);
        }
    }
    void setColor(int c){
        if(!color){
            color = c;
        }
    }
    int validDests(){
        int ret = 0;
        for(Node* d : dests){
            ret += (d->valid);
        }
        return ret;
    }
    Node* getOne(){
        for(Node* d : dests){
            if(d->valid){
                return d;
            }
        }
        exit(1);
    }
};

int main(){
    int n; cin >> n;
    vector<Node> nodes(n);
    for(int i=0;i<n-1;i++){
        int a, b;
        cin >> a >> b;
        a--; b--;
        nodes[a].add2(&nodes[b]);
    }
    while(1){
        vector<pair<Node*, Node*>> cps;
        for(int i=0;i<n;i++){
            if(nodes[i].valid && nodes[i].validDests() == 0){
                cout << "First" << '\n';
                return 0;
            }
            if(nodes[i].valid && nodes[i].validDests() == 1){
                cps.emplace_back(&nodes[i], nodes[i].getOne());
            }
        }
        if(cps.empty()){ break; }
        for(auto& cp : cps){
            if(cp.second->color){
                cout << "First" << '\n';
                return 0;
            }
            cp.first->color = white;
            cp.second->color = black;
            cp.first->valid = false;
            cp.second->valid = false;
        }
    }
    cout << "Second" << '\n';
    return 0;
}