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# (Mono 4.6.2.0) (judge verdict: Accepted)

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using System.Globalization;
using System.Diagnostics;



class Myon
{
    public Myon() { }
    public static int Main()
    {
        new Myon().calc();
        return 0;
    }

    Scanner cin;

    int N;
    int[] a, b;
    List<int>[] es;

    void calc()
    {
        cin = new Scanner();
        N = cin.nextInt();
        a = new int[N - 1];
        b = new int[N - 1];
        es = new List<int>[N];
        for (int i = 0; i < N; i++)
        {
            es[i] = new List<int>();
        }
        for (int i = 0; i < N - 1; i++)
        {
            a[i] = cin.nextInt() - 1;
            b[i] = cin.nextInt() - 1;
            es[a[i]].Add(b[i]);
            es[b[i]].Add(a[i]);
        }

        int start = 0;
        if(dfs(0,-1) == 2)
        {
            Console.WriteLine("First");
            return;
        }
        for (int t = 0; t < 2; t++)
        {
            Queue<int> q = new Queue<int>();
            bool[] used = new bool[N];
            used[start] = true;
            q.Enqueue(start);
            int last = start;
            while(q.Count > 0)
            {
                int now = q.Dequeue();
                foreach (var next in es[now])
                {
                    if (used[next]) continue;
                    used[next] = true;
                    q.Enqueue(next);
                }
            }
            if(dfs(last, -1) == 2)
            {
                Console.WriteLine("First");
                return;
            }
            foreach (var next in es[last])
            {
                if (dfs(next, -1) == 2)
                {
                    Console.WriteLine("First");
                    return;
                }
            }
            start = last;
        }
        Console.WriteLine("Second");
        return;

    }

    int dfs(int p, int pre)
    {
        int ans = 0;
        foreach (var next in es[p])
        {
            if (next == pre) continue;
            ans += dfs(next, p);
        }
        if (ans >= 2) return 2;
        return 1 - ans;
    }
}

class Scanner
{
    string[] s;
    int i;

    char[] cs = new char[] { ' ' };

    public Scanner()
    {
        s = new string[0];
        i = 0;
    }

    public string next()
    {
        if (i < s.Length) return s[i++];
        string st = Console.ReadLine();
        while (st == "") st = Console.ReadLine();
        s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
        i = 0;
        return s[i++];
    }

    public int nextInt()
    {
        return int.Parse(next());
    }

    public long nextLong()
    {
        return long.Parse(next());
    }

    public double nextDouble()
    {
        return double.Parse(next());
    }

}