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 (GCC 5.4.1) (judge verdict: Accepted)

#include <stdio.h>
#include <stdlib.h>

#define datatype int

typedef enum{
	false,
	true
}Boolean;

typedef struct node_sub{
	datatype data;
	struct node_sub *next;
}node;

typedef struct {
	node *fst;
	int num;
}stack;

stack *make_stack(){
	stack *s = (stack *)malloc(sizeof(stack));
	s->fst = NULL;
	s->num = 0;
	return s;
}

Boolean stack_is_empty(stack *s){
	if(s->num == 0){
		return true;
	}
	else{
		return false;
	}
}

void stack_add_data(datatype val, stack *s){
	node *fst = (node *)malloc(sizeof(node));
	fst->data = val;
	fst->next = s->fst;
	s->fst = fst;
	s->num++;
}

datatype stack_take_data(stack *s){
	if(s->num == 0){
		printf("no data in the stack\n");
	}
	datatype ans = s->fst->data;
	node *fst = s->fst;
	s->fst = fst->next;
	free(fst);
	s->num--;
	return ans;
}

datatype stack_look_data(stack *q){
	if(q->num == 0){
		printf("no data in the stack\n");
	}
	else{
		return q->fst->data;
	}
}

typedef struct {
	node *fst;
	node *last;
	int num;
}queue;

queue *make_queue(){
	queue *q = (queue *)malloc(sizeof(queue));
	q->fst = NULL;
	q->last = NULL;
	q->num = 0;
	return q;
}

Boolean queue_is_empty(queue *q){
	if(q->num == 0){
		return true;
	}
	else{
		return false;
	}
}

void queue_add_data(datatype val, queue *q){
	node *last = (node *)malloc(sizeof(node));
	last->data = val;
	last->next = NULL;
	if(queue_is_empty(q) == true){
		q->fst = last;
	}
	else{
		q->last->next = last;
	}
	q->last = last;
	q->num++;
}

datatype queue_take_data(queue *q){
	if(q->num == 0){
		printf("no data in the queue\n");
	}
	datatype ans = q->fst->data;
	node *fst = q->fst;
	if(q->num == 1){
		q->fst = NULL;
		q->last = NULL;
	}
	else{
		q->fst = fst->next;
	}
	free(fst);
	q->num--;
	return ans;
}

datatype queue_look_data(queue *q){
	if(q->num == 0){
		printf("no data in the queue\n");
	}
	else{
		return q->fst->data;
	}
}

void insert_node(int val, node **v){
	node *new = (node *)malloc(sizeof(node));
	new->data = val;
	new->next = *v;
	*v = new;
}

int main(){
	int N, a, b, v, i;
	node *n;
	scanf("%d", &N);
	node **relative = (node **)malloc(sizeof(node *) * N);
	int *parent = (int *)malloc(sizeof(int) * N);
	Boolean *exist = (Boolean *)malloc(sizeof(Boolean) * N);
	for(i = 0; i < N; i++){
		relative[i] = NULL;
		exist[i] = true;
	}
	for(i = 1; i < N; i++){
		scanf("%d%d", &a, &b);
		a--;
		b--;
		insert_node(a, &relative[b]);
		insert_node(b, &relative[a]);
	}
	stack *s = make_stack();
	queue *q = make_queue();
	queue_add_data(0, q);
	stack_add_data(0, s);
	parent[0] = -1;
	while(queue_is_empty(q) == false){
		v = queue_take_data(q);
		for(n = relative[v]; n != NULL; n = n->next){
			if(n->data != parent[v]){
				queue_add_data(n->data, q);
				stack_add_data(n->data, s);
				parent[n->data] = v;
			}
		}
	}
	while(stack_is_empty(s) == false){
		v = stack_take_data(s);
		if(exist[v] == true){
			if(exist[parent[v]] == true){
				exist[parent[v]] = false;
			}
			else{
				printf("First\n");
				return 0;
			}
		}
	}
	printf("Second\n");
	return 0;
}