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):
MIN, MAX = 1, 10 ** 9
 
n, k, s = map(int, input().split())
 
def solve(n, k, s):
    mid = MAX // 2
    a = s
    b = MIN if s > mid else MAX
    return [a] * k + [b] * (n - k)
 
print(*solve(n, k, s))

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

def sieve(n):
    prime = [True] * (n + 1)
    prime[0] = prime[1] = False
    i = 2
    while i * i <= n:
        if prime[i]:
            for j in range(i * i, n + 1, i):
                prime[j] = False
        i += 1
    return [i for i in range(i) if prime[i]]

primes = sieve(1000)

def solve(n, k, s):
    other = None
    for p in primes:
        if s % p != 0:
            other = p
            break
    return [s] * k + [other] * (n - k)

print(*solve(n, k, s))

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

for i in range(N):
  if i <= K-1:
    print(S, end=' ')
  else:
    print(96517, end=' ')

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

Solution (Python):


[N, K, S] = [int(i) for i in input().split()]

A = []
k_number = K
for n in range(N):
    if k_number > 0:
        A.append(S)
        k_number -= 1
    else:
        if S == 1:
            A.append(S+1)
        else:
            A.append(S-1)

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

print(A[N-1])

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

print(*([S] * K + [10**9 if S < 10**9 else (S-1)] * (N - K)))

Solution (Python):
N, K, S = [int(item) for item in input().split()]

ans = []

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

print(*ans)

Solution (Python):
nks = input().split(' ');
n = int(nks[0]);
k = int(nks[1]);
s = int(nks[2]);



for i in range(k) :
	if n - k == 0 and i== k-1 :
		print(s);
	else :
		print(s,'',end='');
for i in range(n-k) :
	nokori = 0;
	if s <= 2 :
		nokori = s+1;
	else :
		nokori = s-1;
	if i == n-k-1 :
		print(nokori);
	else :
		print(nokori,'',end='');

Solution (Python):
n, k, s = map(int, input().split())
s_len = n - k + 1
result = []

if k == 0:
    if not s == pow(10, 9):
        for _ in range(n):
            result.append(s+1)
    else:
        for _ in range(n):
            result.append(1)

elif (n-k+1) <= s:
    shou, amari = divmod(s, n-k+1)
    for i in range(s_len):
        if i < amari:
            result.append(shou+1)
        else:
            result.append(shou)
    for i in range(s_len, n):
        result.append(result[i-s_len])
else:
    for _ in range(s):
        result.append(1)
    count = 1
    for i in range(s, n):
        if count < k:
            result.append(result[i-s])
            count += 1
        else:
            result.append(pow(10, 9))

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

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

sa = N-K+1
a = [1 for i in range(N)]
if S-sa+1 >0:
        
    a[0] = S - sa + 1

    for i in range(1,sa):
        if i < N:
    
            a[i] = 1
    j = 0
    for i in range(sa,N):
        a[i] = a[j]

        j +=1
        j %= sa

    for x in a:
        print(x, end = " ")


else:
    for i in range(K):
        a[i] = S
    if S != 10**9:    
        for i in range(K,N):
            a[i] = 10**9
    else:
        for i in range(K,N):
            a[i] == 10**9 -1
    for x in a:
        print(x, end = " ")

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

for i in range(n-k):
  ans.append(s-1)
  
for i in ans:
  if i == 0:
    i = 1000000000
  print(i,  end=" ")

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

for i in range(n-1):
    print(x[i],end=" ")
else:
    print(x[n-1])

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

ans = [str(S)]*N

if S != 10**9:
    for i in range(K, N):
        ans[i] = str(S+1)
else:
    for i in range(K, N):
        ans[i] = str(1)
    
print(' '.join(ans))

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

if s != int(1e9):
    anslist = [int(1e9)] * n
    for i in range(k):
        anslist[i] = s
    for i in range(len(anslist)):
        print(anslist[i])
else:
    anslist = [1] * n
    for i in range(k):
        anslist[i] = s
    for i in range(len(anslist)):
        print(anslist[i])

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

PAD = 10**9
ans = []
if s==PAD:
  PAD = 1
for i in range(k):
  ans.append(s)
for i in range(n-k):
  ans.append(PAD)  
  
print(*ans)

Solution (Python):
input = raw_input

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

if s == 10**9:
    M = 1
else:
    M = s + 1

if s % 2 == 0:
    a1 = s // 2
    a2 = a1
else:
    a1 = s // 2
    a2 = a1 + 1

if k == n:
    for i in range(n-1):
        print s,
    print s
else:
    for i in range(k):
        print s,
    for i in range(n-k-1):
        print M,
    print M

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

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

Solution (Python):
N, K, S = map(int, input().split())
ret = [max(10 ** 9 - S, 1)] * N
for i in range(K):
    ret[i] = S

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

Solution (Python):
n,k,s = map(int,input().split())
ans = ""
for i in range(n):
    if i > 0:
        print (" ",end="")
    if i < k:
        print (str(s),end="")
    else:
        if s < 1000000:
            print(str(s+1),end="")
        else:
            print(str(s-1),end="")

print ("")

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

if s < 10**9:
    ans = [s]*k + [s+1]*(n-k)
    print(*ans)
    exit()
if s == 10**9:
    if k != 0:
        ans = [s]*k + [1]*(n-k)
        print(*ans)
        exit()
    else:
        ans = [s-1]*n
        print(*ans)
        exit()

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

Solution (Python):
import math

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

ma = N * (N + 1) / 2

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

li = [S for i in range(K)] + [S+k for i in range(N-K)]

for i in range(N-1):
    print(li[i], end=" ")

print(li[N-1])

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

if k==n:
    answer=' '.join(map(str,[s for i in range(n)]))
else:
    first_part=' '.join(map(str,[s for i in range(k)]))
    if s!=10**9:
        second_part=' '.join(map(str,[s+1 for i in range(n-k)]))
    else:
        second_part=' '.join(map(str,[s-1 for i in range(n-k)]))
    answer=first_part+' '+second_part
print(answer)

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

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

if S == 10**9:
    other = 1
else:
    other = 10**9

for i in range(N):
    if i < K:
        ans.append(S)
    else:
        ans.append(other)
print(*ans)

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

ans = []
for i in range(K):
    ans.append(S)
    
for i in range(N - len(ans)):
    ans.append(10**9-1)

print(*ans)

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

A = []

for k in range(K):
    A.append(S)
for i in range(N-K):
    A.append(S-1 if S>=2 else 2)

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

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

Solution (Python):
N, K, S = [int(v) for v in input().split()]

array = []

    
if N == K:
    for i in range(N):
        array.append(str(S))
else:
    for i in range(K):
        array.append(str(S))

    if S == 1000000000:
        while len(array) < N:
            array.append(str(1))
    else:
        while len(array) < N:
            array.append(str(S+1))

print(" ".join(array))

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 >= 10**9:
        ans.append(1)
    else:
        ans.append(S+1)

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

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 > 0:
        ans.append(S-1)
    else:
        ans.append(S+1)

print(*ans)

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

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

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

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

ans = ' '.join(ans)
print(ans)

Solution (Python):
n,k,s = map(int,input().split())
a = s+1
if s > 10 **5:
  a = 1


ans = [a] * n

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

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

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

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

Solution (Python):
def main():
    from sys import stdin, setrecursionlimit
    setrecursionlimit(10**9)
    r = stdin.readline()[:-1]
    
    
    
    
    
    a = list(map(int, r.split()))
    n = a[0]
    k = a[1]
    s = a[2]

    tmp = 0
    if s == 10**9:
        tmp = 1
    else:
        tmp = 10**9
    res = [tmp]*n
    for i in range(k):
        res[i] = s
    print(*res)

    
    
    
    

if __name__ == '__main__':
    main()

Solution (Python):
n,k,s=map(int,input().split())
if s==1000000000:
  b=s-1
else:b=s+1
a=[]
for i in range(k):
  a.append(s)
for i in range(n-k):
  a.append(b)
for i in a:
  print(i, end =" ")

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

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

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

Solution (Python):
import sys
bbn=1000000007
	


		
def main():
	jk=10**9
	n,k,s = map(int, input().split())
	if n == jk and k==1 and s==jk:
		ret = ['1']*jk
		print(' '.join(ret))
		return
	bb=jk if s !=jk else 1
	ret =([str(s)] * k) + ([str(bb)]*(n-k))
	print(' '.join(ret))
	
	

isTest=False

def pa(v):
	if isTest:
		print(v)

if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
		isTest=True
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

Solution (Python):
n, k, s = map(int, input().split())
INF = 10**9

if n == k:
    a = [s] * n
    for i in a:
        print(i, end=' ')

else:
    if s != INF:
        a = [INF] * n
        for i in range(k):
            a[i] = s
        for i in a:
            print(i, end=' ')
    else:
        a = [1] * n
        for i in range(k):
            a[i] = INF
        for i in a:
            print(i, end=' ')

Solution (Python):
N, K, S = map(int, input().split())
T = S + 1
if S + 1 > 100:
    T = S - 1

ans = [S]*K+[T]*(N-K)
print(*ans)

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

Solution (Python):
a, b, c = map(int, input().split())
ans = []
for i in range(b):
    ans.append(str(c))
for i in range(a-b):
    ans.append("12418957")

print(' '.join(ans))

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

ans=[]
if n-k<s:
    ans.append([s]*k)
    ans.append([1]*(n-k))
elif n-k>s:
    ans.append([s+1]*(n-k-s+1))
    ans.append([1]*(s+k-1))
else:
    ans.append([s]*k)
    ans.append([1]*(n-k-1))
    ans.append([s+1])

print(" ".join([" ".join(map(str, l)) for l in ans]))

Solution (Python):

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

Solution (Python):



def main():
    n, k, s = map(int, input().split())
    a = [0 for _ in range(n)]

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

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


if __name__ == '__main__':
    main()

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

for i in range(k):
    ans[i] = s
print(' '.join(map(lambda x: str(x), ans)))

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

ans_list = [str(S)] * K

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

dummy_list = [str(num)] * (H-K)

ans_list.extend(dummy_list)
print(" ".join(ans_list))

Solution (Python):
N, K, S = map(int, input().split())
ans = []
for i in range(N):
    if i < K:
        ans.append(S)
    elif S == 1:
        ans.append(2)
    elif S == 2:
        ans.append(3)
    else:
        ans.append(S // 2 +1)
print(' '.join(map(str, ans)))

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


if S<1000000000:
    L1=[S for i in range(K)]
    L2=[(S+1) for i in range(N-K)]
    L=L1+L2
    print(' '.join(map(str, L)))

else:
    L1=[S for i in range(K)]
    L2=[1 for i in range(N-K)]
    L=L1+L2
    print(' '.join(map(str, L)))

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

print(*arr)

Solution (Python):
import math

def f(n,k,s):
  if s== 10**9:
    return [s if i<k else s-1 for i in range(n)]
  return [s if i<k else s+1 for i in range(n)]
  
    

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

ans = f(n,k,s)

s= ""

for a in ans:
  s += str(a)+" "
  
print(s)

Solution (Python):
import sys

def main():
    n, k, s = [int(i) for i in raw_input().strip().split()]
    if k == 0:
        foo = [s + 1 if s < 1000000000 else 999999999] * n
    elif s > (n - k):
        foo = [1] * (n - k) + [s - (n - k)] + [s] * (k - 1)
    else:
        foo = [s] * k + [n] * (n - k)
    foo = [str(i) for i in foo]
    sys.stdout.write('%s\n' % ' '.join(foo))

if __name__ == '__main__':
    main()

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


if S<1000000000:
  x=[1000000000]*N
  for i in range(K):
    x[i]=S
else:
  x=[1]*N
  for i in range(K):
    x[i]=S
X=map(str,x)
print(' '.join(X))

Solution (Python):


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

Solution (Python):
a = input().split()
a = [int(i) for i in a]

if a[2] < 1000000000:
    out = [a[2]] * a[1] + [a[2] + 1] * (a[0] - a[1])
else:
    out = [a[2]] * a[1] + [a[2] - 1] * (a[0] - a[1])

out = [str(i) for i in out]
print(" ".join(out))

Solution (Python):
import sys; readline = sys.stdin.readline

N, K, S = map(int, readline().split())

M = 10**9

if S < M:
    print(*([S] * K + [S + 1] * (N - K)))
else:
    print(*([S] * K + [S - 1] * (N - K)))

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

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

print(" ".join(list(map(str, A))))

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

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

Solution (Python):
import sys
input = sys.stdin.readline
n, k, s = [int(x) for x in input().strip().split()]

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

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

if n - k + 1 > s:
    n_new = s + k -1
    res = n - n_new
else:
    pass




ones = n_new - k
big = s - ones

kijun = [big]

for _ in range(ones):
    kijun.append(1)

ans = []
hanpuku = -(- n_new // len(kijun))
for i in range(hanpuku):
    for x in kijun:
        ans.append(str(x))

for i in range(len(ans)-n_new):
    ans.pop(-1)

for j in range(res):
    ans.append(str(s+1))


print(' '.join(ans))

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(999999999)
print(*ans)

Solution (Python):


import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    N, K, S = i2nn()
    if S == 10**9:
        print(*([S] * K + [S-1] * (N - K)))
    else:
        print(*([S] * K + [S+1] * (N - K)))
    return

main()

Solution (Python):
n,k,s=map(int,input().split())
ans=[]
for i in range(k):
    ans.append(str(s))
if s==1:
    for i in range(n-k):
        ans.append("2")
elif s==10**9:
    for i in range(n-k):
        ans.append("1")
else:
    for i in range(n-k):
        ans.append(str(10**9))
print(' '.join(ans))

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

pad = [10**9,10**9-1][(S == 10**9)]
l = ([S]*K)
l.extend([pad]*(N-K))

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

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

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

if N == K:
    A=[S]*N
    print(' '.join(map(str, A)))
    exit(0)
    

if S == 1:
    A=[1]*K
    B=[2]*(N-K)
    print(' '.join(map(str, A)) + ' ' + ' '.join(map(str, B)))
    exit(0)
    
if S == 2:
    A=[1]*(K+1)
    B=[3]*(N-K-1)
    print(' '.join(map(str, A)) + ' ' + ' '.join(map(str, B)))
    exit(0)
    
if S == 3:
    if (K+1) % 2 == 0:
        A=[1,2]*((K+1)//2)
        B=[4]*(N-K-1)
        print(' '.join(map(str, A)) + ' ' + ' '.join(map(str, B)))
        exit(0)
    else:
        A=[1,2]*(K//2)
        A2=[1]
        B=[4]*(N-K-1)
        print(' '.join(map(str, A)) + ' ' + ' '.join(map(str, A2)) + ' ' + ' '.join(map(str, B)))
        exit(0)


if S % 2 == 0:
    A=[S//2]*(K+1)
    B=[S//2+1]*(N-K-1)
    print(' '.join(map(str, A)) + ' ' + ' '.join(map(str, B)))
    exit(0)
else:
    if (K+1) % 2 == 0:
        A=[(S-1)//2,(S+1)//2]*((K+1)//2)
        B=[(S+1)//2]*(N-K-1)
        print(' '.join(map(str, A)) + ' ' + ' '.join(map(str, B)))
        exit(0)
    else:
        A=[(S-1)//2,(S+1)//2]*(K//2)
        A2=[(S-1)//2]
        B=[(S+3)//2]*(N-K-1)
        print(' '.join(map(str, A)) + ' ' + ' '.join(map(str, A2)) + ' ' + ' '.join(map(str, B)))
        exit(0)

Solution (Python):


import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N, K, S = MAP()

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

A = [S] * K + [MAX] * (N-K)
print(*A)

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

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

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

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

print(*a)

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



for i in range(K):
    arr[i] = S
if S != 10**9:
    for j in range(K,N):
        arr[j] = 10**9
else:
    for j in range(K,N):
        arr[j] = 1

print(*arr)

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

bad = 1 if s == 10 ** 9 else 10 ** 9
ans =  [str(s) if i < k else str(bad)  for i in range(n)]
print(" ".join(ans))

Solution (Python):
import sys
input = sys.stdin.readline
from operator import itemgetter
sys.setrecursionlimit(10000000)
INF = 10**30

def main():
    n, k, s = list(map(int, input().strip().split()))
    ans = [str(s)] * k
    for i in range(n-k):
        if s != 10**9:
            ans.append(str(10**9))
        else:
            ans.append(str(1))
    for i in range(n):
        print(ans[i])

if __name__ == '__main__':
    main()

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

if(S==10**9):
    dummy = 3
else:
    dummy = S+1

ans_l = []
for _ in range(K):
    ans_l.append(S)
for _ in range(N-K):
    ans_l.append(dummy)

print(" ".join(list(map(str,ans_l))))

Solution (Python):
n, k, s = map(int, input().split())
a = []
for i in range(k):
    a.append(s)
for i in range(n - k):
    if s == 1:
        a.append(2)
    else:
        a.append(s - 1)
for i in a:
    print(i, end = " ")

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

ans = []
ans += [S] * K

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

print(*ans)

Solution (Python):
N, K, S = map(int, input().split())
A = [0]*N
if S != 1:
    for i in range(K):
        A[i] = S
    for i in range(K,N):
        A[i] = max(S-1,1)
    print(" ".join(map(str,A)))
else:
    for i in range(K):
        A[i] = S
    for i in range(K,N):
        A[i] = max(S+1,1)
    print(" ".join(map(str,A)))

Solution (Python):
def main():
    N, K, S = map(int, input().split())
    if S == 1:
        print(' '.join(['1'] * K + ['2'] * (N - K)))
    else:
        if S == 10**9:
            print(' '.join([str(S)] * K + ['1'] * max(0, N - K)))
        else:
            if K < N:
                print(' '.join([str(S)] * K + ['1'] + [str(10**9)] * max(0, N - K - 1)))
            else:
                print(' '.join([str(S)] * K))
main()

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

if s >= 10**9:
    ans = [1]*n
else:
    ans = [10**9] * n

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

print(*ans)

Solution (Python):
from sys import stdout
printn = lambda x: stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True 
BIG = 999999999
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

n,k,s = inm()
r = 10**9
if s==10**9:
    r = 1
for i in range(k):
    printn(str(s)+' ')
for i in range(n-k):
    printn(str(r)+' ')
print('')

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

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

if s != 1e9:
    ret = [s for i in range(k)] + [s+1 for i in range(n-k)]
    print(*ret)
else:
    ret = [s for i in range(k)] + [1 for i in range(n-k)]
    print(*ret)

Solution (Python):
import sys
import math
stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

n, k, s = na()

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

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
N,K,S=map(int,input().split())

if S==10**9:
	for i in range(K):
		print(10**9)
	for j in range(N-K):
		print(12445677)

else:
	for j in range(N-K):
		print(S+1)
	for i in range(K):
		print(S)

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

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

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

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

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

if S == 1:
    ans = [100]*N
    for i in range(K):
        ans[i] = 1
    print(*ans)
    exit()


if S % 2 == 0:
    m = S // 2
    if N - K == 0:
        ans = [S]*N
    elif N - K == 1:
        ans = [m]*N
    else:
        wrong = N-K-1
        ans = [m-1]*wrong
        for _ in range(N-wrong):
            ans.append(m)


else:
    num_down = S // 2
    num_up = -(-S // 2)
    if N - K ==0:
        ans = [S] * N
    elif N -K == 1:
        ans = []
        for i in range(N):
            if i % 2 == 0:
                ans.append(num_down)
            else:
                ans.append(num_up)
    else:
        wrong = N-K-1
        ans = [num_up+2]*wrong
        for i in range(N-wrong):
            if i % 2 == 0:
                ans.append(num_down)
            else:
                ans.append(num_up)
        
print(*ans)

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

Solution (Python):
from sys import stdin

N, K, S = [int(x) for x in stdin.readline().rstrip().split()]
    
ans = [S] * K
if S == 10 ** 9:
    ans.extend([1] * (N - K))
else:
    ans.extend([S + 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):
n, k, s = map(int, input().split())
lis = [0]*n
count = 1
for i in range(k):
    lis[i] = s
for j in range(k, n):
    lis[j] = 10 ** 5 - 1
print(" ".join(map(str, lis)))

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

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

dat = list(map(str, dat))
print(" ".join(dat))

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

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

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

arr = []

for i in range(k):
    arr.append(str(s))

for j in range(n-k):
    if s+1 >= 10*9 +1:
        arr.append(str(s-1))
    else:
        arr.append(str(s+1))

print(" ".join(arr))

Solution (Python):
import sys

INPUT = lambda: sys.stdin.readline().rstrip()
MAP = lambda: map(int, INPUT().split())

sys.setrecursionlimit(10 ** 9)


def main():
    N, K, S = MAP()

    ans = []
    for i in range(N):
        if i < K: ans.append(S)
        else:
            if S-1 >= 1: ans.append(S-1)
            else: ans.append(S+1)

    print(*ans)


if __name__ == '__main__':
    main()

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

if K==0:
    if S==1:
        ans=[2]*N
        print(*ans)
        exit()
    else:
        ans=[S-1]*N
        print(*ans)
        exit()

if S==1:
    ans=[]
    for i in range(K):
        ans.append(1)
    for i in range(N-K):
        ans.append(2)
    print(*ans)
    exit()

if N-K<S:
    ans=[]
    for i in range(K):
        ans.append(S)
    for i in range(N-K):
        ans.append(S-1)
    print(*ans)
elif N-K>=S:
    ans=[]
    n=(N-K)//K
    Pt=[S]
    for i in range(n):
        Pt.append(S-1)
    for i in range(K):
        ans.extend(Pt)
    for i in range(N-(n+1)*K):
        ans.append(S-1)
    print(*ans)

Solution (Python):


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

padnum = 10**9 if s != 10**9 else 1


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

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

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

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]

N,K,S = map(int,input().split(' '))
u = 10**9

if S==u:
    ans = ['1']*N
    for i in range(K):
        ans[i] = str(u)
    print(' '.join(ans))
    exit()
str_s = str(S)
ans = ['1000000000']*N
for i in range(K):
    ans[i] = str_s
print(' '.join(ans))

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

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

else:
    for i in range(n):
        if i < k:
            print(s, end=" ")
        else:
            print(s-1, end=" ")

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

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())
ans = []
tmp = 0
for i in range(n):
    if i < k :
        tmp = s
    else:
        if s == 10**9:
            tmp = 10**9-1
        else:
            tmp = 10**9
    ans.append(str(tmp))
print(' '.join(ans))