module m1
  implicit none
  type :: edge
     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
  type(edge),allocatable :: e(:)

  read *, n
  allocate(e(n))
  allocate(visited(n))

  visited = .false.

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

  do i = 1,n-1
     read *, a, b
     e(a)%v = [e(a)%v,b]
     e(b)%v = [e(b)%v,a]
  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
