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):
def solve(n, k, s):
    if s == 10 ** 9:
        return [s] * k + [1] * (n - k)
    return [s] * k + [s + 1] * (n - k)


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

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

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

if S == 1:
    ans = [S]*K+[S+1]*(N-K)
else:
    ans = [S]*K+[S-1]*(N-K)
for a in ans:
    print(a,end=' ')
print()

Solution (Python):

import sys
from fractions import gcd
from string import ascii_uppercase as ABC

def inpl(): return list(map(int, input().split()))

from itertools import permutations
N, K, S = inpl()
if S < 10**9:
    ans = [S]*(K) + [S+1]*(N-K)
else:
    ans = [S]*(K) + [S-1]*(N-K)
print(*ans)

Solution (Python):
import os
import sys

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7


N, K, S = list(map(int, sys.stdin.buffer.readline().split()))

ans = np.zeros(N, dtype=int)
if S < 10 ** 9:
    ans[:] = 10 ** 9
    ans[:K] = S
else:
    ans[:] = 1
    ans[:K] = 10 ** 9
print(*ans)

Solution (Python):
N, K, S = map(int, input().split())
if S != 10 ** 9:
    a = 10 ** 9
else:
    a = 1

a = [str(S)] * K + [str(a)] * (N-K)
ans = ""
for i in range(N):
    ans += a[i] + " "
print(ans)

Solution (Python):
n, k, s = map(int, input().split())
num = 998245637
arr = [s]*k
arr2 = [num]*(n-k)
print(*(arr+arr2))

Solution (Python):
N, K, S = map(int, input().split())
if S == 1:
    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())
ans = []
if s == 10 ** 9:
    num = 10 ** 9-1
else:
    num = 10 ** 9
for i in range(k):
    ans.append(str(s))
for i in range(n-k):
    ans.append(str(num))
print(" ".join(ans))

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

result = [s] * k

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

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

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

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

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(S+1)
else:
    for i in range(N-K):
        A.append(S-1)

print(*A)

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

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,hypot,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N,K,S=MI()
    if S==10**9:
        print(*([S]*K + [1]*(N-K)))
    else:
        print(*([S]*K + [S+1]*(N-K)))
if __name__ == '__main__':
    main()

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

Solution (Python):
import sys

input = sys.stdin.readline

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

large = 1000000000

if S == large:
    for _ in range(K):
        ans.append(S)
    for _ in range(N - K):
        ans.append(1)  
else:
    for _ in range(K):
        ans.append(S)
    for _ in range(N - K):
        ans.append(large)

print(*ans)

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

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

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

A = [S]*N
if S>N:
  x = 1
else:
  x = 10**9
for i in range(K, N):
  A[i] = x
print " ".join(map(str, A))

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

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

if s == 10**9:
    x = 10**9-1
else:
    x = 10**9

a = []
for i in range(k):
    a.append(s)
for i in range(k,n):
    a.append(x)
print(*a)

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

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

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

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

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

print(*ans)

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

dummy = str(10**9)
if S == 10**9:
  dummy = str(1)

str_S = str(S)

list_str = K * [str_S] + N * [dummy]

print(' '.join(list_str[0:N]))

Solution (Python):
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
def input(): return sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Solution (Python):
n,k,s=map(int,input().split())
ans=[]
if s==10**9:
    ans=[s]*k+[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(item) for item in 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())

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

for i in range(N):
    if K > i:
        print(S, end="")
    else:
        print(INF1, end="")

    if i != N - 1:
        print(" ", end="")

print()

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

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

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(10**9,end="")
        else:
            print(10**9-1,end="")
    print(" ",end="")
print()

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

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

N, K, S = MAP()

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

print(*ans)

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

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

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

else:
    for i in range(k):
        ans.append(s)
    for i in range(n-k):
        ans.append(10**9)

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

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(1)
    else:
        A.append(10**9)

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

Solution (Python):
import math
import fractions

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    
    return divisors

def bitlist(x,digit):
    res = [0 for i in range(digit)]
    now = x
    for i in range(digit):
        res[i]=now%2
        now = now >> 1
    return res




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

nu0 = 1000000000
nu1 =nu0-1
a=[]

if(s==nu0):
    for i in range(k):
        a.append(nu0)
    for i in range(n-k):
        a.append(nu1)
    print(' '.join(map(str,a)))
else:
    for i in range(k):
        a.append(s)
    for i in range(n-k):
        a.append(nu0)
    print(' '.join(map(str,a)))

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

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

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

print(*ans)

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


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

else:
    a=[s for i in range(k)]+[s+1 for i in range(n-k)]

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

Solution (Python):
def examA():
    H = I()
    W = I()
    N = I()
    ans = (N-1)//max(H,W) + 1
    print(ans)
    return

def examB():
    N = I()
    XL = [LI()for _ in range(N)]
    for i in range(N):
        XL[i][0] += XL[i][1]
    XL.sort()

    ans = 0
    now = -inf
    for i in range(N):
        if XL[i][0]-XL[i][1]*2>=now:
            ans +=1
            now = XL[i][0]
    print(ans)
    return

def examC():
    N, K, S = LI()
    A = [0]*N
    if S>=10**6:
        a = 1
    else:
        a = S+1
    for i in range(N):
        if i<K:
            A[i] = S
        else:
            A[i] = a
    print(" ".join(map(str,A)))
    return

def examD():
    return

def examE():
    return

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
alphabet = [chr(ord('a') + i) for i in range(26)]

if __name__ == '__main__':
    examC()

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

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

print(*a)

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

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

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

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

Solution (Python):
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())


N,K,S = inpl()

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

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

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

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

Solution (Python):
n,k,s=map(int,input().split())
if s!=10**9:
    ans=[10**9]*n
    for i in range(k):
        ans[i]=s
else:
    ans=[7]*n
    for i in range(k):
        ans[i]=s
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 = [int(i) for i in input().split()]

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

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

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

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

INF = 10**9
if s != 10**9:
    ans = [INF] * n
    for i in range(k):
        ans[i] = s
    print(*ans)
else:
    ans = [1] * n
    for i in range(k):
        ans[i] = s
    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-K):

    if S == 10**9:
        ans.append(10**9-1)
    else:
        ans.append(10**9)

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

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

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

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


if __name__ == '__main__':
    main()

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

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

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

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

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

    print(" ".join(map(str, Ans)))
    return 0

if __name__ == "__main__":
    solve()

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)))