using System;

namespace ConsoleApp20
{
    class Program
    {
        static long ProveriLevo(long x, long y, long[,] matrica)
        {
            for (long i = y - 1; i >= 0; i--)
            {
                if (matrica[x, i] != 0) return i;
            }

            return -1;
        }

        static long ProveriDesno(long x, long y, long[,] matrica, long n)
        {
            for (long i = y + 1; i < n; i++)
            {
                if (matrica[x, i] != 0) return i;
            }

            return -1;
        }

        static void Main(string[] args)
        {
            long h;
            long n;

            //h = long.Parse(Console.ReadLine());
            //n = long.Parse(Console.ReadLine());

            long[,] matrica = new long[h, n];
            //for (long i = 1; i < h - 1; i++)
            //{
            //    for (long j = 0; j < n; j++)
            //    {
            //        matrica[i, j] = long.Parse(Console.ReadLine());
            //    }
            //}


            for (long j = 1; j < n; j++)
            {
                if (matrica[0,j] == 0)
                {
                    long levo = ProveriLevo(0, j, matrica);
                    if (levo != -1)
                        matrica[0, levo] += 1;
                    else matrica[0, ProveriDesno(0, j, matrica, n)] += 1;
                }
            }

            for (long i = 1; i < h - 1; i++)
            {
                for (long j = 0; j < n; j++)
                {
                    if(matrica[i,j]==0)
                    {
                        long desno = ProveriDesno(i, j, matrica, n);
                        long levo = ProveriLevo(i, j, matrica);

                        if (levo == -1)
                            matrica[i, desno] += matrica[i - 1, j];
                        else
                        if (desno == -1)
                            matrica[i, levo] += matrica[i - 1, j];
                        else 
                        if(matrica[i-1,j]%2==0)
                        {
                            matrica[i, levo] += matrica[i - 1, j] / 2;
                            matrica[i, desno] += matrica[i - 1, j] / 2;
                        }
                        else 
                        if((i+1)%2==0)
                        {
                            matrica[i, levo] += (matrica[i - 1, j] - 1) / 2 + 1;
                            matrica[i, desno] += (matrica[i - 1, j] - 1) / 2;
                        }
                        else {
                            matrica[i, desno] += (matrica[i - 1, j] - 1) / 2 + 1;
                            matrica[i, levo] += (matrica[i - 1, j] - 1) / 2;
                        }
                    }
                }
            }

            for (long j = 0; j < n - 1; j++) 
            {
                Console.Write(matrica[h - 1, j] + " ");
            }
            Console.Write(matrica[h - 1, n - 1]);
        }
    }
}