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):
N, K, S = map(int, input().split())

ans = [0]*N
cnt = 0
for i in range(N):
  if cnt < K:
    ans[i] = str(S)
    cnt += 1
  else:
    ans[i] = str(min(S+1,10**9-1))
    
print(" ".join(ans))

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

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

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(1,end=" ")
else:
    for i in range(K):
        print(S,end=" ")
    for i in range(N-K):
        print(10**9,end=" ")

Solution (Python):


n,k,s = list(map(int,input().split()))
a = []
count = 0
st = ""

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

for i in range(n-k):
    if s < 2:
        a.append(s+1)
    else:
        a.append(s-1)
    
for i in range(n):
    if st == "":
        st = str(a[count])
    else:
        st += " " + str(a[count])
    count += 1

print(st)

Solution (Python):
n, k, s = map(int, input().split())
if k == n:
    print(" ".join([str(s) for _ in range(n)]))
    exit()

arr = []
for i in range(1, n + 1):
    if i <= k:
        arr.append(s)
    else:
        arr.append(8 ** 9 + 14499)  
print(" ".join(list(map(str, arr))))

Solution (Python):
N,K,S = map(int,input().split())
for i in range(1,N+1):
    if i <= K:
        print(S,end=" ")
    else:
        if S == 1e9:
            print(1,end=" ")
        else:
            print(S+1,end=" ")

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

l = []
for i in range(n):
  if i < k:
    l.append(s)
  else:
    l.append((s+1)%m)

print(*l)

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())
A = [0]*n
for i in range(1, n+1):
    if i <= k:
        A[i-1] = s
    else:
        if s == 10**9:
          A[i-1] = 1
        else:
          A[i-1] = 10**9
print(*A)

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

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

a = [s] * n

for i in range(k,len(a)):
    if s != 1:
        a[i] -= 1
    else:
        a[i] += 1

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

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

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

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

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

Solution (Python):

N,K,S = map(int, input().split())
A = []
count = 0
if N == 1:
    A.append(S)
    A = [str(a) for a in A]
    A = " ".join(A)
    print(A)
    exit()
else:
    while count < K:
        A.append(S)
        count += 1

    if N - len(A) > 0:
        if S < 1000000000:
            while len(A) < N:
                A.append(S + 1)
        else:
            while len(A) < N:
                A.append(S - 1)

    else:
        pass
    A = [str(a) for a in A]
    A = " ".join(A)
    print(A)

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

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

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

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

print(*a, sep=' ')

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

Solution (Python):
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")


def main():
    N, K, S = map(int, input().split())
    
    A = [S]*N
    if S == 10**9:
        for i in range(N-K):
            A[i] = S - 1
    else:
        for i in range(N-K):
            A[i] = 10**9

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


if __name__ == '__main__':
    main()

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

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

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

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

if N>len(a):
  for i in range(N-len(a)):
    if S==10**9:
      a.append(S-1)
    else:
      a.append(S+1)
      
print(' '.join(map(str, a)))

Solution (Python):

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

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

print(*A)

Solution (Python):
def main():
    MAX = 10**9

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

    if S == MAX:
        ans = [S - 1 for _ in range(N)]
        for i in range(N):
            if i < K:
                ans[i] = S

        print(" ".join([str(i) for i in ans]))
    else:
        ans = [S + 1 for _ in range(N)]
        for i in range(N):
            if i < K:
                ans[i] = S

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


if __name__ == '__main__':
    main()

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

MAXA = 10**9 - (S-1)

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

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

result = [S % 10 ** 9 + 1] * N
for i in range(K):
    result[i] = S
print(*result)

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

result = [S % (10 ** 9) + 1] * N
for i in range(K):
    result[i] = S
print(*result)

Solution (Python):




import sys
input = sys.stdin.readline



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

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

    for i in range(N-K):
        A.append(str(T))

    res = ' '.join(A)

    print(res)



main()

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

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

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

ans = ""
cnt = 0
for i in range(N):
  if cnt < K:
    ans += str(S) + " "
    cnt += 1
  else:
    if i == N-1:
      ans += str(min(S+1,10**9-1))
    else:
      ans += str(min(S+1,10**9-1)) + " "
    
print(ans)

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

V = [0] * (N + 1)


if K > 0:
    V[1] = S
    K -= 1
else:
    V[1] = S - 1

if S >= 10 ** 9:
    flag = 1
else:
    flag = 0


for i in range(2, N + 1):
    if K > 0:
        V[i] = V[i - 1] + S
        K -= 1
    else:
        if flag:
            V[i] = V[i - 1] + (S - 1)
        else:
            V[i] = V[i - 1] + (S + 1)

ans = [0] * N
for i in range(N):
    ans[i] = V[i + 1] - V[i]

print(*ans)

Solution (Python):



def ri():
    return int(input())

def rl():
    return list(input().split())

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

def main():
    n, k, s = rli()
    ans = [s for _ in range(k)]
    if s < n:
        inf = 10000000
    else:
        inf = 1
    ans += [inf]*(n-k)
    print(" ".join(map(str, ans)))



if __name__ == '__main__':
    main()

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

if K == 0:
    if S == INF:
        print(' '.join([str(INF-1) for _ in range(N)]))
    else:
        print(' '.join([str(INF) for _ in range(N)]))
    exit()

if S == INF:
    ans = [INF] * K
    ans.extend([INF-1] * (N-K))
else:
    ans = [S] * K
    ans.extend([INF] * (N-K))
print(' '.join([str(x) for x in ans]))

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

ans = [0]*N

if S == 1e9:
    for i in range(K):
        ans[i] = S
    for i in range(K,N):
        ans[i] = 1 
else:
    for i in range(K):
        ans[i] = S
    for i in range(K,N):
        ans[i] = S+1
    

print(*ans)

Solution (Python):
def main():
    N,K,S = [int(n) for n in input().split()]
    if S == 1:
        A = []
        for i in range(K):
            A.append("1")
        for i in range(N-K):
            A.append("10")
        print(" ".join(A))
        return
    if K==1:
        A = []
        A.append(str(S))
        for i in range(N-1):
            A.append(str(S-1))
        print(" ".join(A))
        return

    if S == 2:
        A = []
        for i in range(K):
            A.append("2")
        for i in range(N-K):
            A.append("10")
        print(" ".join(A))
        return
    
    
    
    
    
    
    
    
    
    
    
    
    
    B = []
    for i in range(K):
        B.append(str(S))
    for i in range(N-K):
        B.append(str(S-1))

    print(" ".join(B))
main()

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

list=[]

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

if len(list) < n:
    for i in range(n-len(list)):
        if s == 1:
            list.append(s+1)
        else:
            list.append(s-1)

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

Solution (Python):
import sys
import numpy as np
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

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

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

print(*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-1==0:
                a.append(s+1)
        else:
                a.append(s-1)
print(*a)

Solution (Python):
import sys
import numpy as np
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

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

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

print(*ans)

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

V = [0] * (N + 1)

if K == 0 and S == 1000000000:
    for i in range(N):
        V[i] = 999999999


if K > 0:
    V[1] = S
    K -= 1
else:
    V[1] = S + 1


if S >= 10 ** 9:
    flag = 1
else:
    flag = 0

for i in range(2, N + 1):
    if K > 0:
        V[i] = V[i - 1] + S
        K -= 1
    else:
        if flag:
            V[i] = V[i - 1] + (S - 1)
        else:
            V[i] = V[i - 1] + (S + 1)

ans = [0] * N
for i in range(N):
    ans[i] = V[i + 1] - V[i]

print(*ans)

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

Solution (Python):
import numpy as np
n,k,s = map(int,input().split())
a=np.arange(n)
if k>0 and s<1000000000:
  a[:k]=s
  a[k:]=s+1
elif k>0 and s>=1000000000:
  a[:k]=s
  a[k:]=s-1
elif k==0 and s>=1000000000:
  a[:]=s-1
else:
  a[:]=s+1
for s in a:
  print(s, end =" ")

Solution (Python):

N, K, S = map(int, input().split())
L = []
for i in range(N):
    if i < K:
        L.append(S)
    else:
        if S == 79865413:
            L.append(99999989)
        else:
            L.append(79865413)
print(*L)

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

    maxmax = s+1
    if maxmax == 10**9+1:
        maxmax = s-1

    ans_list = [maxmax]*n

    if k == 0:
        print(*ans_list)
        exit()

    if k == 1:
        ans_list[0] = s
        print(*ans_list)
        exit()

    if s == 1:
        for i in range(k):
            ans_list[i] = 1
        print(*ans_list)
        exit()

    if k != n:
        first = s // 2
        second = s - first
        for i in range(k):
            if i % 2 == 0:
                ans_list[i] = first
            else:
                ans_list[i] = second
        ans_list[n-1] = s
    else:
        for i in range(k):
            ans_list[i] = s       
        
    print(*ans_list)
 
if __name__ == '__main__':
    main()

Solution (Python):
n, k, s = map(int, input().split())
a = []
for _ in range(k):
        a.append(str(s))
for _ in range(n-k):
  if s != 1000000000:
  	a.append(str(s+1))
  else:
    a.append(str(s-1))
ans = ' '.join(a)
print(ans)

Solution (Python):
N, K, S = map(int, input().split())
a = [S] * K
if S < 1000000000:
    b = [S + 1] * (N - K)
else:
    b = [S - 1] * (N - K)
print(' '.join(map(str, a + b)))

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

x = 1
for i in range(n - k):
    if s == 1:
        ans.append(2)
    else:
        ans.append(s-1)

print(*ans)

Solution (Python):
from math import ceil
N, K, S = map(int,input().split())

fill = 10**9
if S == 10**9: fill-=2
if N == K:
  for i in range(K): print(S,end=" ")
elif S == 1:    
  for i in range(K): print(1,end=" ")
  for i in range(N-K): print(fill,end=" ")  
else:
  for i in range(ceil(K/2)): 
    print(S-1,end=" ")
    print(1,end=" ")
  if K%2 == 0: 
    print(S-1,end=" ")  
    for i in range(N-ceil(K/2)*2-1):
      print(fill,end=" ")
  else:
    for i in range(N-ceil(K/2)*2):
      print(fill,end=" ")

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

Solution (Python):
import math
import fractions
import bisect
import collections
import itertools
import heapq
import string
import sys
import copy
from collections import deque
sys.setrecursionlimit(10**7)
def gcd(a,b):return fractions.gcd(a,b) 
def lcm(a,b):return (a*b) // fractions.gcd(a,b) 
def iin(): return int(input()) 
def isn(): return input().split() 
def imn(): return map(int, input().split()) 
def iln(): return list(map(int, input().split())) 
def iln_s(): return sorted(iln()) 
def iln_r(): return sorted(iln(), reverse=True) 
def join(l, s=''): return s.join(l) 
def perm(l, n): return itertools.permutations(l, n) 
def perm_count(n, r): return math.factorial(n) // math.factorial(n-r) 
def comb(l, n): return itertools.combinations(l, n) 
def comb_count(n, r): return math.factorial(n) // (math.factorial(n-r) * math.factorial(r)) 

N,K,S = imn()
cnt = 0
A = []
for i in range(N):
    
    cnt += 1
    if cnt <= K: 
        A.append(str(S))
    else:
        if S != 10**9:
            A.append(str(10**9)) 
        else:
            A.append(str(1))
print(join(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:
  if N==1:
    A.append(10**9)
  else:
    for i in range(K):
      A.append(S)
    for i in range(N-K):
      A.append(S-1)
  
  print(*A)

Solution (Python):
def main():
    n, k, s = list(map(int, input().split()))
    ans = [0] * n
    for i in range(k):
        ans[i] = s
    if s == 10 ** 9:
        for i in range(k, n):
            ans[i] = 1
        print(" ".join(str(x) for x in ans))
    elif s > 1:
        stack = 0
        for i in range(k, n):
            if stack + 1 == s:
                stack = 0
                ans[i] = int(10 ** 9)
            else:
                stack += 1
                ans[i] = 1
        print(" ".join(str(x) for x in ans))
    else:
        for i in range(k, n):
            ans[i] = 2
        print(" ".join(str(x) for x in ans))
    return
if __name__ == "__main__":
    main()

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

for e in ans:
    print(e, end=' ')
print()

Solution (Python):
import math
import queue
import bisect
import heapq
import time
import itertools

mod = int(1e9+7)

def swap(a,b):
    return (b,a)

def my_round(a,dig=0): 
    p = 10 ** dig
    return (a * p * 2 + 1) // 2 / p

def round_up(a):
    return int(a + 0.9)

def gcd(a,b): 
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

def lcm(a,b): 
    return a/gcd(a,b)*b

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

def is_prime(a): 
    if a<2:
        return False
    elif a==2:
        return True
    elif a%2==0:
        return False
    sqrt_num = int(a**0.5)
    for i in range(3,sqrt_num+1,2):
        if a%i==0:
            return False
    return True

def prime_num(a): 
    pn = [2]
    for i in range(3,int(a**0.5),2):
        prime = True
        for j in pn:
            if i%j==0:
                prime = False
                break
        if prime:
            pn.append(i)
    return pn

def prime_fact(a): 
    sqrt = math.sqrt(a)
    res = []
    i = 2
    if is_prime(a):
        res.append(a)
    else:
        while a!=1:
            while a%i==0:
                res.append(i)
                a //= i
            i += 1
    return res

def main():
    n,k,s = map(int,input().split())
    ans = []
    count = 0
    for i in range(n):
        if count < k:
            ans.append(str(s))
            count += 1
        else:
            if s == int(1e9):
                ans.append(str(s - 1))
            else:
                ans.append(str(s + 1))
    print(' '.join(ans))
    return

if __name__=='__main__':
    main()

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

A = [1*10**9 if s!=1*10**9 else 1 for i in range(n)]

for i in range(k):
    A[i]=s
print(*A)

Solution (Python):
n = input()    
m = n.split()
p = [int(i) for i in m]
a = []
if p[2] >=10 **9-1:
    b = p[2]-1
else:
    b = p[2]+2
for i in range(p[0]):
    if i < p[1]:
        a.append(str(p[2]))
    else:
        a.append(str(b))
A = " ".join(a)
print(A)

Solution (Python):
N,K,S=map(int,input().split())
ans=[S]*K
if len(ans)<N:
    nk=N-K
    if S==1000000000:
        aps=S-1
    else:
        aps=S+1
    for i in range(nk):
        ans.append(aps)
print(' '.join(map(str,ans)))

Solution (Python):

N, K, S = map(int, input().split())
L = []
for i in range(N):
    if i < K:
        L.append(S)
    else:
        L.append(99999989)
print(*L)

Solution (Python):
import sys
from pprint import pprint

def solve(n, k, s):
    a = [0] * 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__':
    n, k, s = map(int, sys.stdin.readline().strip().split(" "))
    solve(n, k, s)

Solution (Python):
N, K, S = map(int,input().split())
 
n = [278]*N
for i in range(K):
  n[i] = S
for i in range(N):
	print(n[i],end=' ')

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

Solution (Python):
N,K,S = map(int,input().split())
X = [26845184 for _ in range(N)]
ans=""
for i in range (K):
    X[i]=S

print(*X)

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

    salt = -1 if S >= 10**9 else 1
    if K == 0:
        arr = [S+salt] *N
    else:
        arr = [] 
        for i in range(0, K):
            arr += [S]
        while len(arr) < N:
                arr += [S+salt]

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

if __name__ == "__main__":
    main()

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

Solution (Python):
import itertools
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
import math
import queue


Mod = 1000000007
import sys

sys.setrecursionlimit(100000) 
  
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res

def factorial(i):
    if i == 1:
        return 1
    else:
        return i*factorial(i-1)
 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[py] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)




def main(): 
    n,k,s = map(int,input().split())
    if s == 10**9:
        a = [10**9]*k
        for i in range(n-k):
            a.append(1)
        print(*a,sep = " ")
        exit()
    elif s == 1:
        a = [1]*k
        for i in range(n-k):
            a.append(10**9)
        print(*a,sep = " ")
        exit()
    
        
    elif n == k:
        print(*[s for i in range(n)],sep = " ")
    else:
        a = [0]*n
        a[0] = 1
        for i in range(1,k+1):
            if i % 2 != 0:
                a[i] = s-1
            else:
                a[i] = 1
        for i in range(k+1,n):
            a[i] = 10**9
        print(*a,sep = " ")
    
if __name__ == "__main__":
    main()

Solution (Python):
import sys

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

ans = ''
s1, s2 = 0, 0
if S % 2 == 0:
    s1 = s2 = S // 2
else:
    s1 = S // 2
    s2 = s1 + 1

ex = 10 ** 9
while ex == s1 or ex == s2 or ex == S or ex == 0:
    ex -= 1


if K == 0:
    for i in range(N): ans += str(ex) + ' '
elif K == N:
    for i in range(N): ans += str(S) + ' '
elif S == 1:
    for i in range(K): ans += str(S) + ' '
    for j in range(N-K): ans += str(ex) + ' '
else:
    for i in range(N):
        if i % 2 == 0 and i < K:
            ans += str(s1) + ' '
        elif i < K:
            ans += str(s2) + ' '
        elif i == K:
            ans += str(S) + ' '
        else:
            ans += str(ex) + ' '

print(ans.rstrip())

Solution (Python):
H = list(map(int, input().split()))
N = H[0]
K = H[1]
S = H[2]
ans=[]
if(10**5<S):
    for i in range(K):
        ans.append(int(S))
    for i in range(N-K):
        ans.append(1)
else:
    for i in range(K):
        ans.append(int(S))
    for i in range(N-K):
        ans.append(10**5)
for  item in ans:
    print(item,end=' ')

Solution (Python):
n, k, s = map(int, input().split())
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):
N, K, S = map(int,input().split())
ans = []
for i in range(K):
    ans.append(S)

for i in range(N-K):
    if S == 1000000000:
        ans.append(1)
    else:
        ans.append(S+1)

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

Solution (Python):



def solve(*args: str) -> str:
    n, k, s = map(int, args[0].split())

    A = [0]*n
    m = n-k+1
    if 0 < s//m:
        for i in range(n):
            A[i] = s//m
            if i % m == 0:
                A[i] += s % m
    else:
        for i in range(n):
            if i < k:
                A[i] = s
            else:
                A[i] = 10**9

    return ' '.join(map(str, A))


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

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

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

for i in ls+pad:
	print(i)

Solution (Python):
N,K,S = map(int,input().split())
t = [999999999]*N
for i in range(K):
    t[i] = S
print(*t)

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

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

for i in range(2, 10**6):
    if gcd(S, i) == 1:
        break

ans = []
ans.extend([S for _ in range(K)])
ans.extend([i for _ in range(N-K)])

ans_str = ""
for j in range(len(ans)):
    ans_str += str(ans[j])
    ans_str += " "
ans_str = ans_str[:len(ans_str) - 1]
print(ans_str)

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

for i in range(K):
  l[i] = S
if N != K:
  if S != 1000000000:
    for j in range(K,N):
      l[j] = 1000000000
  else:
    for j in range(K,N):
      l[j] = 999999999
  
l1 = ' '.join(map(str, l))
print(l1)

Solution (Python):

"""
Created on Sat Jan 18 21:04:22 2020
1h 28min WA
@author: masat

"""

N, K, S = map(int, input().split())
"""
N = 100
K = 10
S = 10
"""
not_S = None
if S == 10**9:
    not_S = 1
else:
    not_S = S+1

answer = []

for i in range(K):
    answer.append(S)
for i in range(N-K):
    answer.append(not_S)

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

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

List = []
tmp = 0
if S == 10 ** 9:
    tmp = 10 ** 9 - 1
else:
    tmp = S + 1

for i in range(0, K):
    List.append(S)
for i in range(K, N):
    List.append(tmp)

print(*List)

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

if S % 2 == 1:
  big = math.ceil(S/2)
  small = math.floor(S/2)
else:
  big = int(S/2)
  small = big

ans = list()
if N == K:
  for i,j in enumerate(range(N)):
    ans.append(S)
elif S == 1:
  for i,j in enumerate(range(N)):
    if i < K:
      ans.append(1)
    else:
      ans.append(2)
else:
  for i,j in enumerate(range(N)):
    if i <= K:
      if i % 2 == 0:
        ans.append(small)
      else:
        ans.append(big)
    else:
      if S != 10**9:
        ans.append(S+1)
      else:
        ans.append(S-1)
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(K, N):
  if S == 10**9:
    A.append(S-1)
  else:
    A.append(S + 1)
print(*A)

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(S-1)


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

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

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

array = []
if N >= K :
  if (N-K) >= S:
    array.extend([S] * K)
    array.extend([S+1] * (N-K))
  else:
    array.extend([S] * K)
    array.extend([1] * (N-K))

array_str = " ".join(map(str, array))
print(array_str)

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

if k == n:
    print(' '.join(map(str, [s for _ in range(n)])))
elif k == 0:
    print(' '.join(map(str, l)))
else:
    if s == 1:
        l[0:k] = [s for _ in range(k)]
    elif s % 2 == 0:
        l[0:k+1] = [s//2 for _ in range(k+1)]
    else:
        u, t = (s-1)//2, (s+1)//2
        for i in range(k+1):
            if i % 2 == 0:
                l[i] = u
            else:
                l[i] = t

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

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

if s == 1000000000:

  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(1000000000, end="")
    print(" ", end="")

Solution (Python):
def main():
    n, k, s = map(int, input().split(" "))
    array = []
    dummy = s + 1
    if s == 10 ** 9:
        dummy = s - 1
    if k <= n:
        array = [s for _ in range(k)]
        array += [dummy for _ in range(k, n)]
    print(" ".join(map(str, array)))


if __name__ == '__main__':
    main()

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

A=[s]*k
for i in range(len(A),n):
  if s!=10**9:
    A.append(s+1)
  else:
    A.append(1)
print(*A)

Solution (Python):
N, K, S = map(int, input().split())
if K == 0: A = [735477] * N; print(*A); exit(0)
if N == K: A = [S] * K; print(*A); exit(0)
if N == 1: print(S); exit(0)
if N == 2:
    if (S % 2 == 0): print(int(S / 2), int(S / 2)); exit(0)
    if (S % 2 == 1): print(int(S / 2), int(S / 2 + 1)); exit(0)
if S == 1:
    A = [1] * K
    for i in range(N - len(A)): A.append(735477)
    print(*A)
    exit(0)
if S % 2 == 0:
    A = [int(S / 2)] * (K + 1)
    for i in range(N - len(A)): A.append(735477)
    print(*A)
else:
    if(K % 2 == 0):
        A = [int(S / 2), int(S / 2) + 1] * int(K / 2)
        A.append(int(S / 2))
        for i in range(N - len(A)): A.append(735477)
        print(*A)
    else:
        A = [int(S / 2), int(S / 2) + 1] * int(K / 2 + 1)
        for i in range(N - len(A)): A.append(735477)
        print(*A)

Solution (Python):
line=list(map(int,input().split()))
N=line[0]
K=line[1]
S=line[2]
ans=[]
for i in range(K):
  ans.append(S)

for j in range(N-K):
  if S==1:
    ans.append(S+1)
  else:
    ans.append(S-1)
for k in range(N):
  print(str(ans[k])+" ",end="")

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

if s < 1000:
    result = [s for i in range(k)] + [s + 10 for i in range(n-k)]
else:
    result = [s for i in range(k)] + [s - 10 for i in range(n-k)]

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

Solution (Python):
n, k, s = list(map(int, input().split()))
i = 0
list = []
while i < k:
  print(str(s) + ' ', end="")
  i = i + 1
while i < n:
  if s != 1000000000:
    print(str(s+1) + ' ',end="")
  else:
    print(str(s-1) + ' ',end="")
  i = i + 1