#include <iostream>
using namespace std;
int main()
{
    int n,k,x;
    cin>>n>>k>>x;
    if(k==3)
    {
        int brojac=0;
        for(int i=1;i<=n;i+=x+1)
        {
            if(brojac!=3)
            {
                cout<<"1 2 3";
                i=3;
                brojac++;
            }
            i+=x+1;
            cout<<x<<" ";
        }
    }
    
}