program atcoder_contest_scheduling
  implicit none
  integer :: d, c(26) = 0, s(26, 365) = 0, i, j, x = 0
  read(*,*) d
  read(*,*) c
  read(*,*) (s(:, i), i = 1, d)
  do i = 1, d
    write(*,'(i0)') mod(i - 1, 26) + 1
  end do
end program atcoder_contest_scheduling