Problem:
 Score : 400 points    Problem Statement Given are three integers N , K , and S .  Find a sequence A_1, A_2, ..., A_N of N integers between 1 and 10^9 (inclusive) that satisfies the condition below.
We can prove that, under the conditions in Constraints, such a sequence always exists.   There are exactly K pairs (l, r) of integers such that 1 \leq l \leq r \leq N and A_l + A_{l + 1} + \cdots + A_r = S .       Constraints  1 \leq N \leq 10^5  0 \leq K \leq N  1 \leq S \leq 10^9  All values in input are integers.         Input Input is given from Standard Input in the following format:  N  K  S       Output Print a sequence satisfying the condition, in the following format:  A_1  A_2  ...  A_N         Sample Input 1 4 2 3      Sample Output 1 1 2 3 4  Two pairs (l, r) = (1, 2) and (3, 3) satisfy the condition in the statement.       Sample Input 2 5 3 100      Sample Output 2 50 50 50 30 70

Solution (Python):
from sys import stdin
N,K,S = [int(x) for x in stdin.readline().rstrip().split()]

if S == 10**9:
    ans = [S]*K + [1]*(N-K)
else:
    ans = [S]*K + [S+1]*(N-K)
for i in ans:
    print(i,end=" ")

Solution (Python):
N,K,S = map(int,input().split())
if S == 10**9: print(" ".join([str(S)]*K+[str(1)]*(N-K)))
else: print(" ".join([str(S)]*K+[str(S+1)]*(N-K)))

Solution (Python):


import sys
sys.setrecursionlimit(300000)


def solve(N: int, K: int, S: int):
    MX = 10 ** 9
    ret = []
    for i in range(K):
        ret.append(str(S))
    tmp = S + 1 if S < MX else S - 1
    for i in range(N - K):
        ret.append(str(tmp))
    print(' '.join(ret))
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    K = int(next(tokens))  
    S = int(next(tokens))  
    solve(N, K, S)

if __name__ == '__main__':
    main()

Solution (Python):

from fractions import gcd
import math

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

def main():
            
    n,k,s = mi()
    a = []
    if s == 10**9:
        for i in range(k):
            a.append(s)
        for i in range(n-k):
            a.append(1)
    else:
        for i in range(k):
            a.append(s)
        for i in range(n-k):
            a.append(10**9)
    print(*a)




main()

Solution (Python):
N, K, S = map(int, input().split())
if S < 10 ** 9:
    A = [S if i < K else S+1 for i in range(N)]
else:
    A = [S if i < K else S-1 for i in range(N)]
print(*A)

Solution (Python):

N, K, S = map(int, input().split())
if S != 10**9:
    ans = []
    for i in range(N):
        if i < K:
            ans.append(S)
        else:
            ans.append(S+1)
else:
    ans = []
    for i in range(N):
        if i < K:
            ans.append(S)
        else:
            ans.append(1)
print(*ans)

Solution (Python):
n, k, s = map(int, input().split())
ans = [s for _ in range(k)]
for i in range(k, n):
        ans.append(s+1) if s < 1000000000 else ans.append(1)
print(*ans)

Solution (Python):
N, K, S = map(int, input().split())
if S > 2:
    print(*([S]*K+[S-1]*(N-K)))
else:
    print(*([S]*K+[S+10**6]*(N-K)))

Solution (Python):
N, K, S = map(int, input().split())

ans = [S]*K
if S == 10**9:
    
    ans += [1]*(N - K)   
else:
    ans += [S+1]*(N - K)
ans = list(map(str, ans))

print(" ".join(ans))

Solution (Python):
n,k,s=map(int,input().split())
if s==10**9:
  res=(str(s)+' ')*k+'1 '*(n-k)
else:
  res=(str(s)+' ')*k+(str(s+1)+' ')*(n-k)
print(res)

Solution (Python):
n,k,s=map(int,input().split())
if s==10**9:
  lst=[s]*k+[1]*(n-k)
  print(*lst)
else:
  lst=[s]*k+[s+1]*(n-k)
  print(*lst)

Solution (Python):
N, K, S  = map(int, input().split())
if S != 10**9:
    ans = [S] * K + [10**9]*(N-K)
else:
    ans = [S] * K + [1] * (N-K)
print(*ans)

Solution (Python):
N,K,S=map(int,input().split())
ans=[S for i in range(K)]
if S==10**9:
  ans2=[1 for i in range(N-K)]
else:
  ans2=[S+1 for i in range(N-K)]
ans=ans+ans2
print(*ans)

Solution (Python):
n,k,s=map(int,input().split())
a=[s]*k
for i in range(k,n):
    if s==10**9:
        a+=10**9-1,
    else:
        a+=10**9,
print(*a)

Solution (Python):
n, k, s = map(int, input().split())

ans = []

for _ in range(k):
    ans.append(s)

if s < 10 ** 9:
    for _ in range(n-k):
        ans.append(s+1)

elif s == 10 ** 9:
    for _ in range(n-k):
        ans.append(1)

print(*ans)

Solution (Python):
n, k, s = map(int, input().split())

ans = [s for _ in range(k)]
if s == 10**9:
  ans += [1 for _ in range(n - k)]
else:
  ans += [s+1 for _ in range(n - k)]

print(*ans)

Solution (Python):
N, K, S = map(int, input().split())
X = [S] * K
if S != 10 ** 9:
    Y = [10 ** 9] * (N - K)
else:
    Y = [S - 1] * (N - K)
Z = X+Y

print(*Z, sep=" ")

Solution (Python):
n,k,s=map(int,input().split())
if s<10**9:
  ans=[s]*k+[s+1]*(n-k)
else:
  ans=[s]*k+[1]*(n-k)
print(" ".join(map(str,ans)))

Solution (Python):
n, k, s = map(int, input().split())
print(*[s] * k + [s % 10**9 + 1] * (n - k))

Solution (Python):
n,k,s=map(int,input().split())
if s<10**9:
  arr=[s]*k+[s+1]*(n-k)
else:
  arr=[s]*k+[1]*(n-k)
print(' '.join(map(str,arr)))

Solution (Python):
n, k, s = map(int, input().split())

print(*[s] * k + [s % 10**9 + 1] * (n - k))

Solution (Python):
import sys
input = sys.stdin.buffer.readline

def main():
    N,K,S = map(int,input().split())
    if S == 10**9:
        l = [S]*K+[S-1]*(N-K)
    else:
        l = [S]*K+[S+1]*(N-K)
    
    print(*l)
    
if __name__ == "__main__":
    main()

Solution (Python):
N, K, S = map(int, input().split())

huge = 1000000000
if S == huge:
    huge -= 2

A = [huge] * N

for i in range(N):
    if K == 0:
        break

    A[i] = S

    K -= 1


for i in range(N):
    print(A[i], end=" ")

Solution (Python):
n, k, s = map(int, input().split())
a = []
if s == 10**9:
  for i in range(k):
    a.append(10**9)
  for j in range(k,n):
    a.append(1)
else:
  for i in range(k):
    a.append(s)
  for j in range(k,n):
    a.append(10**9)
print(*a)

Solution (Python):
N, K, S = map(int, input().split())

if S != 10 **9:
    N = [S+1] * N    
else:
    N = [1] * N

for i in range(K):
        N[i] = S

print(*N)

Solution (Python):
n, k, s = map(int, input().split())

ans = [s]*k

if s < 10**9:
    ans.extend([s+1]*(n-k))
else:
    ans.extend([1]*(n-k))

print(" ".join(map(str, ans)))

Solution (Python):
n,k,s = map(int,input().split())
ans = []
if (s < 1000000000):
    for i in range(n):
        if (i < k):
            ans.append(s)
        else:
            ans.append(s + 1)
elif (s == 1000000000):
    for j in range(n):
        if (j < k):
            ans.append(s)
        else:
            ans.append(1)
ans = map(str,ans)
print(' '.join(ans))

Solution (Python):
N, K, S = map(int, input().split())

if S == 10**9:
    ans = [S for _ in range(K)] + [1] * (N - K)
else:
    ans = [S for _ in range(K)] + [S + 1] * (N - K)

print(' '.join(map(str, ans)))

Solution (Python):
n, k ,s = map(int, input().split())
ans = []

if s<10**9:
    for i in range(n):
        if i <= k-1:
            ans.append(s)
        else:
            ans.append(s+1)
elif s==10**9:
    for j in range(n):
        if j <= k-1:
            ans.append(s)
        else:
            ans.append(1)
ans = map(str, ans)
print(' '.join(ans))

Solution (Python):
def main():
    N, K, S = map( int, input().split())
    t = 1
    if S <= N:
        t = N+1
    ANS = [S]*K + [t]*(N-K)
    print(" ".join( map( str, ANS)))
if __name__ == '__main__':
    main()

Solution (Python):
def main():
    n, k, s = map(int, input().split())
    ans = []
    for i in range(k):
        ans.append(str(s))
    for i in range(n-k):
        if s < 10**9:
            ans.append(str(s+1))
        else:
            ans.append('1')

    print(' '.join(ans))


main()

Solution (Python):

import re
import math


mod=int(10**9+7)


N,K,S=map(int,input().split())
A=[]
for a in range(N):
    if a<K:
        A.append(S)
    else:
        if(S<10**9):A.append(S+1)
        else: A.append(1)
print(" ".join(map(str,A)))

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = 1e10


def solve():
    n, k, s = LI()
    if s == 10 ** 9:
        for i in range(k):
            print(s, end=" ")
        for i in range(n - k):
            print(s - 1, end=" ")
        print()
        return
    for i in range(k):
        print(s, end=" ")
    for i in range(n - k):
        print(s + 1, end=" ")
    print()
    return



if __name__ == '__main__':
    solve()

Solution (Python):
import itertools

n, k, s = map(int, input().split())
ans = [0] * n

if s == 1000000000:
    for i in range(n):
        if i < k:
            ans[i] = s
        else:
            ans[i] = 1
else:
    for i in range(n):
        if i < k:
            ans[i] = s
        else:
            ans[i] = s+1

for i in ans:
    print(i, end=" ")
print()

Solution (Python):
N, K, S = map(int, input().split())

M = 10 ** 9

res = [str(S) for _ in range(K)]

res += [("1" if S == M else str(S+1)) for _ in range(N-K)]

print(" ".join(res))

Solution (Python):
n, k, s = map(int, input().split())
if s == 1e+9:
    ans = [str(s)] * k + [str(1)] * (n-k)
else:
    ans = [str(s)] * k + [str(s + 1)] * (n-k)

print(' '.join(ans))

Solution (Python):
n, k, s = map(int, input().split())

if s == 10 ** 9:
    ans = [s for _ in range(k)] + [1] * (n-k)
else:
    ans = [s for _ in range(k)] + [s+1] * (n-k)

print(*ans)

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
mod2 = 998244353
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    n,k,s = LI()
    t = s + 1
    if s == 10**9:
        t = 1
    a = [s] * k + [t] * (n-k)

    return JA(a, " ")


print(main())

Solution (Python):




n,k,s=map(int,input().split())
result=[]
if s<10**9:
    for _ in range(k):
        result.append(str(s))
    for _ in range(n-k):
        result.append(str(10**9))
else:
    for _ in range(k):
        result.append(str(s))
    for _ in range(n-k):
        result.append(str(1))

print(" ".join(result))

Solution (Python):
n, k ,s = map(int, input().split())
v=[]

for i in range(k):
    v.append(s)

for i in range(n-k):
    if s!=10**9:
        v.append(s+1)
    else:
        v.append(s-1)


print(*v)

Solution (Python):
n,k,s = map(int,input().split())
ans = [s]*k + [(s%(10**6)+1) for i in range(n-k)]
 
print(" ".join(map(str,ans)))

Solution (Python):
n, k, s = map(int, input().split())
if s != 10 ** 9:
    ans = [s] * k + [s + 1] * (n - k)
else:
    ans = [s] * k + [1] * (n - k)
print(' '.join(map(str, ans)))

Solution (Python):
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()
nas = lambda: stdin.readline().split()

n, k, s = na()

for i in range(n):
    if i:
        print(' ', end='')
    if i < k:
        print(s, end='')
    else:
        print(s + 1 if s != pow(10, 9) else 1, end='')

print()

Solution (Python):
n,k,s = [int(i) for i in input().split()]
 
ans_list = []
for i in range(n):
  if i < k:
    ans_list.append(str(s))
  else:
    ans_list.append(str(s+1) if s < 10 ** 9 else '1')
    
print(*ans_list)

Solution (Python):
n, k, s = map(int, input().split())
print(*[s] * k + [(s + 1) % 10**9] * (n - k))

Solution (Python):
N, K, S = map(int, input().split())
if S != 10**9:
  ans = [S] * K + [10**9] * (N - K)
else:
  ans = [S] * K + [10**9-1] * (N - K)
print(*ans)

Solution (Python):
n, k, s = map(int, input().split())

if s == 10 ** 9:
    ans = [s] * k + [1] * (n - k)
else:
    ans = [s] * k + [s + 1] * (n - k)

print(*ans)

Solution (Python):
MAX = 10**9


def main():
    N, K, S = map(int, input().split())
    ans = [S] * K + [(S + 1) % MAX] * (N - K)
    print(*ans)


if __name__ == '__main__':
    main()

Solution (Python):
n,k,s=map(int,input().split());print(*[s]*k+[7]*(n-k))

Solution (Python):

def main():
    inputs_list = input().split()
    N = int(inputs_list[0])
    K = int(inputs_list[1])
    S = int(inputs_list[2])

    ans = []
    for i in range(K):
        ans.append(S)
    for j in range(N - K):
        if S < 10 ** 9:
            ans.append(S + 1)
        elif S == 10 ** 9:
            ans.append(1)

    print(' '.join(map(str, ans)))


if __name__ == '__main__':
    main()

Solution (Python):
n,k,s=map(int,input().split());print(*[s]*k+[19]*(n-k))

Solution (Python):
n,k,s=map(int,input().split());print(*[s]*k+[9**9]*(n-k))

Solution (Python):
n,k,s=map(int,input().split());print(*[s]*k+[2**29]*(n-k))

Solution (Python):
n,k,s=map(int,input().split())
a=[s]*k
for i in range(k,n):
    if s==10**9:
        a+=10**9-1,
    else:
        a+=10**9,
print(*a)

Solution (Python):



def main():
    S_MAX = 10 ** 9

    n, k, s = map(int, input().split())
    fill = (1) if (s == S_MAX) else (s + 1)
    
    
    
    
    

    ret = [s] * k + [fill] * (n - k)
    print(*ret)


if __name__ == '__main__':
    main()

Solution (Python):


def main():
    S_MAX = 10 ** 9

    n, k, s = map(int, input().split())
    fill = (1) if (s == S_MAX) else (s + 1)
    
    
    

    ret = [s] * k + [fill] * (n - k)
    print(*ret)


if __name__ == '__main__':
    main()

Solution (Python):
a,b,c=  map(int,input().split())
M = 10**9
if c == M:l = [c]*b+[1]*(a-b)
else:l = [c]*b+[M]*(a-b)

print(*l)

Solution (Python):
def main():
    N, K, S = map(int, input().split())

    if S == 10**9:
        for i in range(N):
            if i < K:
                print(S, end=" ")
            elif i == (N-1):
                print(1)
            else:
                print(1, end=" ")
    else:
        for i in range(N):
            if i < K:
                print(S, end=" ")
            elif i == (N-1):
                print(S+1)
            else:
                print(S+1, end=" ")
    return 0

if __name__ == '__main__':
    main()

Solution (Python):
def Prime_factor_set(n, add_1=False):
    ret = set()
    if add_1:
        ret.add(1)

    x = n

    divisor = 2
    while x % divisor == 0:
        x //= divisor
        ret.add(divisor)

    divisor = 3
    while divisor * divisor <= n:
        while x % divisor == 0:
            x //= divisor
            ret.add(divisor)
        divisor += 2

    if x > 1:
        ret.add(x)

    return ret


def main():
    from functools import reduce
    from operator import mul

    n, k, s = map(int, input().split())

    pd = Prime_factor_set(s, add_1=True)
    m = reduce(mul, pd) + 1  
    

    ret = [s] * k + [m] * (n - k)
    
    
    
    
    print(*ret)


if __name__ == '__main__':
    main()

Solution (Python):
n,k,s = map(int, input().split())

if s==10**9:
  rest = 10**9-1
else:
  rest=10**9
ans=[s]*k+[rest]*(n-k)
print(*ans)

Solution (Python):
n,k,s = map(int,input().split())

if s == 1000000000:
    l = [str(1) for i in range(n)]
else:
    l = [str(s+1) for i in range(n)]

for i in range(k):
    l[i] = (str(s))
    

print(' '.join(l))

Solution (Python):


n,k,s=map(int,input().split())
if s==10**9:
    rest=10**9-1
else:
    rest=10**9
ans=[s]*k+[rest]*(n-k)
print(*ans)

Solution (Python):
n,k,s = map(int,input().split())

l = []

for i in range(k):
    l.append(str(s))
    
for i in range(n-k):
    if s == 1000000000:
        l.append(str(1))
    else:
        l.append(str(s+1))
        
print(' '.join(l))

Solution (Python):


iim = lambda: map(int, input().rstrip().split())

def NKS(N, K, S):
    M5 = 10**5
    M9 = 10**9

    for i in range(K):
        yield S

    tmp = S + 1 if S < M9 else 1
    for i in range(N-K):
        yield tmp

def resolve():
    N, K, S = iim()

    it = NKS(N, K, S)
    for i in range(N-1):
        print(next(it), end=" ")
    print(next(it))

if __name__ == "__main__":
    resolve()

Solution (Python):
import math,sys
from collections import Counter, defaultdict, deque
from sys import stdin, stdout
input = stdin.readline
lili=lambda:list(map(int,sys.stdin.readlines()))
li = lambda:list(map(int,input().split()))

I=lambda:int(input())
S=lambda:input().strip()
mod = 1000000007

n,k,s=li()
c=0
f=0
while(k>0 and n>0):
    print(s,end=" ")
    k-=1
    n-=1
while(n):
    if(s==0):
        print(1,end=" ")
    elif(s==(10**9)):
        print(s-1,end=" ")
    else:
        print(s+1,end=" ")
    n-=1


print("")

Solution (Python):
n,k,s = input().split()
ans = ""
for i in range(0,int(k)):
    ans += s+" "
l = int(n)-int(k)
a = int(s) - 1
if a==0:
    a = 2
for i in range(0,l):
    ans += str(a)+" "
print(ans)

Solution (Python):
N, K, S = map(int, input().split())
if S == 10 ** 9:
    ans = [10 ** 9] * K
    ans.extend([1] * (N - K))
else:
    ans = [S] * K
    ans.extend([S + 1] * (N - K))
print(' '.join([str(x) for x in ans]))

Solution (Python):
N,K,S = map(int,input().split())
Smax = 10**9

A = [S for _ in range(K)]
if S < Smax:
    A += [S+1 for _ in range(N-K)]
else:
    A += [S-1 for _ in range(N-K)]

for a in A[:-1]:
    print('{} '.format(a), end = "")
print('{}'.format(A[-1]))

Solution (Python):
import math


n,k,s = map(int,input().split())

for i in range(k):
    print(s,end=" ")





blank = pow(10,9)-1
if s == blank:
    blank = 1

for i in range(k,n):
    print(blank,end=" ")
print()

Solution (Python):
import math


n,k,s = map(int,input().split())

for i in range(k):
    print(s,end=" ")





blank = pow(10,9)-1
if s == blank:
    blank = 1

for i in range(k,n):
    text = " "
    if  i == n-1:
        text = ""
    print(blank,end=text)
print()

Solution (Python):
n,k,s =map(int,input().split())

for i in range(k):
    print(s,end=" ")
for i in range(n-k):
    if s==10**9:
        print(s-1,end=" ")
    else:
        print(s+1,end=" ")
print()

Solution (Python):
N,K,S = map(int, input().strip().split(' '))
_S = 1 if S == 1000000000 else S+1
ans = [S]*K + [_S]*(N-K)
print(*ans)

Solution (Python):
N, K, S = map(int, input().split())

mylist = []

if S != 10**9:
    for k in range(K):
        mylist += [S]
    for l in range(N-K):
        mylist += [S+1]
else:
    for k in range(K):
        mylist += [S]
    for l in range(N-K):
        mylist += [1]
        
print(" ".join(map(str, mylist)))

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n, k, s = MAP()
 
if s == 10 ** 9:
  a = 1
else:
  a = 10 ** 9

ans = [s] * k + [a] * (n - k)
 
print(*ans)

Solution (Python):
N,K,S=map(int,input().split())
ans = []
for i in range(K):
    ans.append(S)
for j in range(N-K):
    ans.append(114514)
print(*ans)

Solution (Python):
N, K, S = map(int, input().split())

A = [S for i in range(K)]

if S == 1:
  A = A[:] + [2 for i in range(N - K)]
elif S == int(1e+9):
  A = A[:] + [S - 1 for i in range(N - K)]
else:
  A = A[:] + [int(1e+9) for i in range(N - K)]

for i in range(N):
  if i != N - 1:
    print(A[i], end = ' ')
  else:
    print(A[i])

Solution (Python):
import sys
import itertools
input = sys.stdin.readline


def read_values():
    return map(int, input().split())


def read_list():
    return list(read_values())


def read_lists(N):
    return [read_list() for n in range(N)]


def f(A):
    min_num = A[0] + A[-1]


def main():
    N, K, S = read_values()
    L = [S] * K
    L += ([S + 1] if S != 10 ** 9 else [1]) * (N - K)
    print(" ".join(map(str, L)))


if __name__ == "__main__":
    main()

Solution (Python):
N, K, S = map(int, input().split())

ans = []

for i in range(K):
  ans.append(S)
if S < 10**9:
  for i in range(N - K):
    ans.append(S + 1)
else:
  for i in range(N - K):
    ans.append(1)

print(*ans)

Solution (Python):
def main():
    N, K, S = map(int, input().split())

    dummy = 10**9 - 1 if S == 10**9 else 10**9

    ans = []
    for _ in range(K):
        ans.append(str(S))

    for _ in range(N - K):
        ans.append(str(dummy))

    print(" ".join(ans))


main()

Solution (Python):
def solve():
    N, K, S = map(int, input().split())
    if S == 10 ** 9:
        ans = [S for _ in range(K)] + [1 for _ in range(N - K)]
    else:
        ans = [S for _ in range(K)] + [S + 1 for _ in range(N - K)]
    print(' '.join(map(str, ans)))


if __name__ == '__main__':
    solve()

Solution (Python):
N, K, S = map(int, input().split())
A = []
for i in range(K):
    A.append(S)

p = 1
if S == 10 ** 9:
    p = -1

for i in range(N - K):
    A.append(S + p)

print(' '.join([str(i) for i in A]))

Solution (Python):
n, k, s = map(int, input().split())
print(*([s] * k + [1 if s == 10 ** 9 else s + 1] * (n - k)))

Solution (Python):
n,k,s = map(int,input().split())
if s == 10**9:
    l = [s]*k + [1]*(n-k)
else:
    l = [s]*k + [s+1]*(n-k)
print(*l)

Solution (Python):
N, K, S = map(int,input().split())


ans = [S for a in range(K)]
if S == 10**9:
    ain = [1 for a in range(N-K)]
else:
    ain = [S+1 for a in range(N-K)]
ans = ans + ain
print(*ans)

Solution (Python):
N,K,S = map(int,input().split())
ans = []
if S == 10**9:
    for i in range(K):
        ans.append(S)
    for i in range(N-K):
        ans.append(1)
else:
    for i in range(K):
        ans.append(S)
    for i in range(N-K):
        ans.append(S+1)
print(" ".join(map(str,ans)))

Solution (Python):
n, k, s = map(int, input().strip().split())

if s==10**9:
    [print(s,end=" ") for _ in range(k)]
    [print(1,end=" ") for _ in range(n-k)]
else:
    [print(s,end=" ") for _ in range(k)]
    [print(s+1,end=" ") for _ in range(n-k)]

Solution (Python):
N, K, S = map(int, input().split())

ans = [S] * K

if S == 10**9:
    for _ in range(N-K):
        ans.append(1)
else:
    for _ in range(N-K):
        ans.append(S+1)
print(*ans)

Solution (Python):
N, K, S = map(int, input().split())

MAX = 10 ** 9
if S == MAX:
    A = [S] * K + [1] * (N - K)
else:
    A = [S] * K + [MAX] * (N - K)

print(*A)

Solution (Python):
n,k,s=map(int,input().split())
l=[s]*k
if s==1:
 l+=[s+1]*(n-k)
else:
 l+=[s-1]*(n-k)
print(*l)

Solution (Python):
from math import factorial
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time


def I(): return int(input())


def MI(): return map(int, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


def MS(): return map(str, input().split())

YN = ['No', 'Yes']
MOD = 10**9+7
inf = float('inf')
IINF = 10**10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']



show_flg = True


def main():
    N, K, S = MI()
    cur = 0
    ans = [0] * N

    for i in range(N):
        if cur < K:
            ans[i] = S
            cur += 1
        else:
            if S == 10 ** 9:
                ans[i] = 10 ** 9 - 1
            else:
                ans[i] = S + 1

    print(*ans)


if __name__ == '__main__':
    main()

Solution (Python):
N,K,S = map(int, input().split())

if S == 10**9:
  ans = [S]*K +[1]*(N-K)
else:
  ans = [S]*K +[S+1]*(N-K)

ans_txt=''

for s in ans:
  ans_txt += str(s)+' '

print(ans_txt)

Solution (Python):
n,k,s = map(int, input().split())
if s == 10**9:
  l = [1]*(n-k) + [s]*k
else:
  l = [s+1]*(n-k) + [s]*k
print(" ".join(map(str,l)))

Solution (Python):
n, k, s = map(int, input().split())

if s == 1e9:
  lst = [s] * k + [1] * (n-k)
else:
  lst = [s] * k + [s+1] * (n-k)
  
print(' '.join(map(str, lst)))

Solution (Python):
n,k,s=map(int,input().split())
if s==10**9:
    ans=(str(s)+" ")*k+(str(1)+" ")*(n-k)


else:
    ans=(str(s)+" ")*k+(str(s+1)+" ")*(n-k)



print(ans)

Solution (Python):
n,k,s=map(int,input().split())
a=[]
for i in range(n):
    if i < k:
        a.append(s)
    elif s<10**9:
        a.append(s+1)
    else:
        a.append(1)
print(*a)

Solution (Python):
n,k,s = map(int, input().split())

out = []

m = 1000000000

if s == m:
  for i in range(k):
    out.append(str(m))
  for i in range(n-k):
    out.append(str(m-1))
else:
  for i in range(k):
    out.append(str(s))
  for i in range(n-k):
    out.append(str(m))
print(' '.join(out))

Solution (Python):
N, K, S = map(int, input().split())

l = [S]*K + [(S+1)%10**9]*(N-K) 

print(*l)

Solution (Python):
N,K,S=map(int,input().split())
if S!=10**9:
  l=[S]*K+[S+1]*(N-K)
  print(" ".join(map(str,l)))
else:
  l=[S]*K+[1]*(N-K)
  print(" ".join(map(str,l)))

Solution (Python):
n,k,s=map(int,input().split())
if s==10**9:
    for i in range(k):
        print(s)
    for i in range(k,n):
        print(1)
else:
    for i in range(k):
        print(s)
    for i in range(k,n):
        print(s+1)

Solution (Python):
N, K, S = map(int, input().split())
A = [S] * K
A.extend([S + 1 if S < 10**9 else 1] * (N - K))
print(" ".join(str(a) for a in A))

Solution (Python):
N,K,S = map(int,input().split())

anslist = []

if S < 10**9:
    for i in range(K):
        anslist.append(S)
    for i in range(N-K):
        anslist.append(S+1)
elif S == 10**9:
    for i in range(K):
        anslist.append(S)
    for i in range(N-K):
        anslist.append(1)

ansString = [str(i) for i in anslist]

print(" ".join(ansString))

Solution (Python):
N, K, S = map(int, input().split())
A = [S+1 if S != 10**9 else 1]*N
for i in range(K):
    A[i] = S
print(*A)

Solution (Python):
n,k,s=map(int,input().split())
for i in range(k):
  print(s,end=" ")
for i in range(k,n):
  if s==10**9:
    print(s-1,end=" ")
  else:
    print(s+1,end=" ")

Solution (Python):
N, K, S=map(int, input().split())
Ans=[]
Ans+=[S] * K

if S!=10**9:
    Ans+=[S+1] * (N-K)
else: 
    Ans+=[1] * (N-K)
 
print(*Ans)

Solution (Python):
n, k, s = map(int, input().split())

if s == 10**9:
    ans = [s] * k + [1] * (n-k)
else:
    ans = [s] * k + [10**9] * (n-k)
print(' '.join(map(str, ans)))

Solution (Python):
N, K, S = map(int, input().split())
ans = [S] * K
if S==10**9:
  for _ in range(N-K):
    ans.append(1)
else:
  for _ in range(N-K):
    ans.append(S+1)
print(" ".join(map(str, ans)))

Solution (Python):
N, K, S = [int(n) for n in input().split()]
ans = []
for i in range(N-K):
    ans.append(S+1 if S<10**9 else 1)
for j in range(K):
    ans.append(S)
print(" ".join([str(n) for n in ans]))

Solution (Python):
N, K, S=map(int, input().split())
Ans=[]

for i in range(K):
    Ans.append(S)

if S!=10**9:
    for i in range(N-K):
        Ans.append(S+1)
else: 
    for i in range(N-K):
        Ans.append(1)
 
print(*Ans)

Solution (Python):

import sys


def solve(N: int, K: int, S: int):
    ans=[-1]*N
    yok=0
    for i in range(N):
        if i<K:
            ans[i]=S
        else:
            if S>N:
                ans[i]=1
                yok+=1
            else:
                ans[i]=10**9
    
    for i in range(N):
        print(ans[i],end=" ")

    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    K = int(next(tokens))  
    S = int(next(tokens))  
    solve(N, K, S)

if __name__ == '__main__':
    main()

Solution (Python):
(N, K, S) = list(map(int, input().split()))
a = [str(S)] * K

if S == 10**9:
    b = [str(1)] * (N-K)
else:
    b = [str(10**9)] * (N-K)

c = a + b
print(' '.join(c))

Solution (Python):
n,k,s=map(int,input().split())
if s==10**9:
  x=10**9-1
else:
  x=10**9

ls_a=[s]*k
ls_b=[x]*(n-k)
print(" ".join(list(map(str,ls_a+ls_b))))

Solution (Python):
n,k,s=map(int,input().split())
a=[0]*n
for i in range(n):
  if 2<s:
    if i<k:
      a[i]=s
    else:
      a[i]=s-1
  else:
    if i<k:
      a[i]=s
    else:
      a[i]=s+1
print(' '.join(map(str,a)))

Solution (Python):
n, k, s = [int(x) for x in input().split()]
m       = 10 ** 9

a = "{}".format(s)
b = "{}".format(1 if s == m else m)

print(" ".join([a] * k + [b] * (n - k)))

Solution (Python):
n, k, s = map(int, input().split())
if s == 10**9:
    print(*([10**9] * k + [1] * (n - k)))
else:
    print(*([s] * k + [10**9] * (n - k)))

Solution (Python):


N,K,S=map(int,input().split())
ans=[]
p=N-K

if S!=10**9:
    for i in range(N-K):
        ans.append(str(S+1))
    for i in range(K):
        ans.append(str(S))
else:
    for i in range(N-K):
        ans.append(str(1))
    for i in range(K):
        ans.append(str(S))







print(*ans)

Solution (Python):
n, k, s = map(int, input().split())
mod = 10**9
l = [s]*k + [(s+1)%mod]*(n-k)
print(*l)

Solution (Python):
n, k, s = map(int, input().split())
ans = []
for i in range(k):
    ans.append(s)
for i in range(n - k):
    if s + 1 <= 10 ** 9:
        ans.append(s + 1)
    else:
        ans.append(1)
print(*ans)

Solution (Python):
import math
def solve():
  n,k,s = (int(i) for i in input().split())
  query = [10**9]*n
  for i in range(k):
    query[i] = s
  if s != 10**9:
    print(*query)
  else:
    for i in range(n-k):
      query[i] = 1
    print(*query)
solve()

Solution (Python):
n, k, s = tuple(map(int, input().split()))
a = []
if s >= 10**5:
    for i in range(k):
        a.append(s)
    for i in range(n-k):
        a.append(1)
else:
    for i in range(k):
        a.append(s)
    for i in range(n-k):
        a.append(10**9)
print(*a)