from collections import deque



N = int(eval(input()))

e = [[] for _ in range(N)]

# 隣接リスト



for _ in range(N - 1):

    a, b = list(map(int, input().split()))

    a -= 1

    b -= 1

    e[a].append(b)

    e[b].append(a)



# BFS*2で直径を求める

dist = [-1 for _ in range(N)]

dist[0] = 0



q = deque()

q.append(0)



while q:

    v = q.popleft()

    d = dist[v]

    for nv in [x for x in e[v] if dist[x] == -1]:

        dist[nv] = d + 1

        q.append(nv)

# 探索終了後

# (v,d)=頂点0から最遠点の頂点番号v,頂点0からの距離d



dist = [-1 for _ in range(N)]

dist[v] = 0



q = deque()

q.append(v)



while q:

    w = q.popleft()

    d = dist[w]

    for nw in [x for x in e[w] if dist[x] == -1]:

        dist[nw] = d + 1

        q.append(nw)

# 探索終了後

# (w,d)=頂点vから最遠点の頂点番号w,頂点vからの距離d



print(('Second' if d % 3 == 1 else 'First'))
from collections import deque

import sys



input = sys.stdin.readline



N = int(eval(input()))

e = [[] for _ in range(N)]

# 隣接リスト



for _ in range(N - 1):

    a, b = list(map(int, input().split()))

    a -= 1

    b -= 1

    e[a].append(b)

    e[b].append(a)





# BFS*2で直径を求める

def bfs(i):

    """

    :param i: bfsの始点, 0-indexed

    :return: (v,d), iの最遠点vまでの距離d

    """

    dist = [-1 for _ in range(N)]

    dist[i] = 0



    q = deque((i,))

    while q:

        v = q.popleft()

        d = dist[v]

        for nv in [x for x in e[v] if dist[x] == -1]:

            dist[nv] = d + 1

            q.append(nv)

    return v, d





x, _ = bfs(0)

_, d = bfs(x)



print(('Second' if d % 3 == 1 else 'First'))

from collections import deque

N = int(eval(input()))
e = [[] for _ in range(N)]
# 隣接リスト
for _ in range(N - 1):
    a, b = list(map(int, input().split()))
    a -= 1
    b -= 1
    e[a].append(b)
    e[b].append(a)
# BFS*2で直径を求める
dist = [-1 for _ in range(N)]
dist[0] = 0
q = deque()
q.append(0)
while q:
    v = q.popleft()
    d = dist[v]
    for nv in [x for x in e[v] if dist[x] == -1]:
        dist[nv] = d + 1
        q.append(nv)
# 探索終了後
# (v,d)=頂点0から最遠点の頂点番号v,頂点0からの距離d
dist = [-1 for _ in range(N)]
dist[v] = 0
q = deque()
q.append(v)
while q:
    w = q.popleft()
    d = dist[w]
    for nw in [x for x in e[w] if dist[x] == -1]:
        dist[nw] = d + 1
        q.append(nw)
# 探索終了後
# (w,d)=頂点vから最遠点の頂点番号w,頂点vからの距離d
print(("Second" if d % 3 == 1 else "First"))

from collections import deque
import sys

input = sys.stdin.readline
N = int(eval(input()))
e = [[] for _ in range(N)]
# 隣接リスト
for _ in range(N - 1):
    a, b = list(map(int, input().split()))
    a -= 1
    b -= 1
    e[a].append(b)
    e[b].append(a)
# BFS*2で直径を求める
def bfs(i):
    """
    :param i: bfsの始点, 0-indexed
    :return: (v,d), iの最遠点vまでの距離d
    """
    dist = [-1 for _ in range(N)]
    dist[i] = 0
    q = deque((i,))
    while q:
        v = q.popleft()
        d = dist[v]
        for nv in [x for x in e[v] if dist[x] == -1]:
            dist[nv] = d + 1
            q.append(nv)
    return v, d


x, _ = bfs(0)
_, d = bfs(x)
print(("Second" if d % 3 == 1 else "First"))

+import sys +input = sys.stdin.readline -dist = [-1 for _ in range(N)] -dist[0] = 0 -q = deque() -q.append(0) -while q: -    v = q.popleft() -    d = dist[v] -    for nv in [x for x in e[v] if dist[x] == -1]: -        dist[nv] = d + 1 -        q.append(nv) -# 探索終了後 -# (v,d)=頂点0から最遠点の頂点番号v,頂点0からの距離d -dist = [-1 for _ in range(N)] -dist[v] = 0 -q = deque() -q.append(v) -while q: -    w = q.popleft() -    d = dist[w] -    for nw in [x for x in e[w] if dist[x] == -1]: -        dist[nw] = d + 1 -        q.append(nw) -# 探索終了後 -# (w,d)=頂点vから最遠点の頂点番号w,頂点vからの距離d +def bfs(i): +    """ +    :param i: bfsの始点, 0-indexed +    :return: (v,d), iの最遠点vまでの距離d +    """ +    dist = [-1 for _ in range(N)] +    dist[i] = 0 +    q = deque((i,)) +    while q: +        v = q.popleft() +        d = dist[v] +        for nv in [x for x in e[v] if dist[x] == -1]: +            dist[nv] = d + 1 +            q.append(nv) +    return v, d + + +x, _ = bfs(0) +_, d = bfs(x)