module m1
  implicit none
  type :: edge
     integer ix
     integer,allocatable :: v(:)
  end type edge
  integer ans,v0
  logical,allocatable :: visited(:)
end module m1

program agc033c
  use m1
  implicit none
  integer a, b, i, n
  integer,allocatable :: v1(:), v2(:), cnt(:)
  type(edge),allocatable :: e(:)

  read *, n
  allocate(v1(n-1),v2(n-1),cnt(n),e(n),visited(n))

  v1 = 0
  v2 = 0
  cnt = 0
  visited = .false.

  do i = 1,n-1
     read *, a,b
     v1(i) = a
     v2(i) = b
     cnt(a) = cnt(a) + 1
     cnt(b) = cnt(b) + 1
  end do

  do i = 1,n
     e(i)%ix = 1
     allocate(e(i)%v(cnt(i)))
  end do

  do i = 1,n-1
     e(v1(i))%v(e(v1(i))%ix) = v2(i)
     e(v2(i))%v(e(v2(i))%ix) = v1(i)
     e(v1(i))%ix = e(v1(i))%ix + 1
     e(v2(i))%ix = e(v2(i))%ix + 1
  end do

  ans = 0
  v0 = 1

  call visit(1,0)
  call visit(v0,0)

  if (mod(ans,3) == 1) then
     print *, 'Second'
  else
     print *, 'First'
  end if

contains

  recursive subroutine visit(vertex,distance)
    integer,intent(in) :: vertex,distance
    integer i

    visited(vertex) = .true.

    do i = 1,size(e(vertex)%v)
       if (.not.visited(e(vertex)%v(i))) then
          call visit(e(vertex)%v(i),distance+1)
       end if
    end do

    visited(vertex) = .false.

    if (ans < distance) then
       ans = distance
       v0 = vertex
    end if
  end subroutine visit
end program agc033c
