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 int long long
#define inf 1000000007LL

#define rep(i, n) for(int i = 0; i < (n); i++)
#define rrep(i, n) for(int i = (n) - 1; i >= 0; i--)
#define trep(i, n) for(int i = 0; i <= (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define mfor(i, s, t) for(int i = (s); i < (t); i++)
#define tfor(i, s, t) for(int i = (s); i <= (t); i++)

class Dinic {
public:
  vector<vector<pair<int, int>>> v;
  vector<int> e;

  vector<int> k;
  vector<int> j;

  void init(int n) {
    v = vector<vector<pair<int, int>>>(n);
    e = vector<int>();
    k = vector<int>(n);
    j = vector<int>(n);
  }
  void add_edge(int a, int b, int atob, int btoa = 0) {
    v[a].push_back(make_pair(b, e.size()));
    e.push_back(atob);
    v[b].push_back(make_pair(a, e.size()));
    e.push_back(btoa);
  }
  void dyk(int s) {
    for(auto& i : k) {
      i = inf;
    }
    queue<pair<int, int>> pq;
    pq.push(make_pair(0, s));
    while(!pq.empty()) {
      int w = pq.front().first;
      int b = pq.front().second;
      pq.pop();
      if(k[b] > w) {
        k[b] = w;
        for(auto i : v[b]) {
          if(e[i.second] > 0) {
            pq.push(make_pair(w + 1, i.first));
          }
        }
      }
    }
  }
  int dfs(int s, int t, int p, int c) {
    if(p == t) {
      return c;
    }
    int all = 0;
    while(c > all && j[p] < v[p].size()) {
      if(k[v[p][j[p]].first] == k[p] + 1) {
        int r = dfs(s, t, v[p][j[p]].first, min(c - all, e[v[p][j[p]].second]));
        e[v[p][j[p]].second] -= r;
        e[v[p][j[p]].second ^ 1] += r;
        if(r < c - all) {
          j[p]++;
        }
        all += r;
      }
      else {
        j[p]++;
      }
    }
    return all;
  }
  int solve(int s, int t) {
    int all = 0;
    while(1) {
      dyk(s);
      for(auto& i : j) {
        i = 0;
      }
      int r = dfs(s, t, s, inf);
      if(r == 0) {
        return all;
      }
      all += r;
    }
  }
};

class Rmq {
public:
  vector<int> d;
  int n;

  void init(int nw) {
    n = 1;
    while(n < nw) {
      n *= 2;
    }
    d.resize(n * 2);
    rep(i, n * 2) {
      d[i] = inf * inf;
    }
  }
  void set_(int b, int x, int p, int nb, int ne) {
    if(nb <= b && b < ne) {
      if(nb == ne - 1) {
        d[p] = min(d[p], x);
      }
      else {
        int m = (nb + ne) / 2;
        set_(b, x, p * 2 + 1, nb, m);
        set_(b, x, p * 2 + 2, m, ne);
        d[p] = min(d[p * 2 + 1], d[p * 2 + 2]);
      }
    }
  }
  void set(int b, int x) {
    set_(b, x, 0, 0, n);
  }
  int get_(int b, int e, int p, int nb, int ne) {
    if(b <= nb && ne <= e) {
      return d[p];
    }
    else if(ne <= b || e <= nb) {
      return inf * inf;
    }
    else {
      int m = (nb + ne) / 2;
      return min(get_(b, e, p * 2 + 1, nb, m), get_(b, e, p * 2 + 2, m, ne));
    }
  }
  int get(int b, int e) {
    return get_(b, e, 0, 0, n);
  }
};

vector<int> v[114514];

pair<pair<bool, bool>, pair<bool, bool>> dfs(int p, int o) {
  if(v[p].size() == 1) {
    return make_pair(make_pair(true, false), make_pair(false, false));
  }
  pair<pair<bool, bool>, pair<bool, bool>> r = make_pair(make_pair(false, false), make_pair(false, false));
  int k = 0;
  for(auto i : v[p]) {
    if(i != o) {
      auto w = dfs(i, p);
      if(w.first.first) {
        k++;
        r.first.second = true;
      }
      if(w.first.second) {
        r.first.first = true;
      }
      if(w.second.first) {
        r.second.second = true;
      }
      if(w.second.second) {
        r.second.first = true;
      }
    }
  }
  if(k >= 2 || (r.first.first && r.second.first) || (r.first.second && r.second.second)) {
    cout << "First" << endl;
    exit(0);
  }
  if(k == 1) {
    r.second.second = true;
  }
  return r;
}

signed main() {
  int n;
  cin >> n;
  rep(i, n - 1) {
    int a, b;
    cin >> a >> b;
    v[a - 1].push_back(b - 1);
    v[b - 1].push_back(a - 1);
  }
  dfs(0, -1);
  cout << "Second" << endl;
}