program main
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int64):: n,k,i,j,l,r,jj
    integer(int64), allocatable:: a(:), na(:)
    logical:: same

    read*, n,k
    allocate(a(n), na(n))
    ! read*, a(:)
    a(:) = 0
    a(1) = 1

    if (k >= 100) then
        a(:) = n
        print'(*(i0,1x))', a(:)
        stop
    end if

    do i=1,k
        na(:) = 0
        same = .true.
        do j=1,n
            l = max(j-a(j),1_8)
            r = min(j+a(j),n)
            
            do jj=l,r
                na(jj)=na(jj)+1
            end do
        end do
        do j=1,n
            if (na(j) /= a(j)) then
                same = .false.
                exit
            end if
        end do
        if (same) exit
        a(:) = na(:)
    end do
    ! print'(i0)', i
    print'(*(i0,1x))', na(:)
end program main