Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
import sys


def solve(N: int, K: int, S: int):
    if K==0:
        if S>N:
            ans=[0]*N
        else:
            ans=[N+1]*N
    elif K==N:
        ans=[S]*N

    else:
        for i in range(N):
            yok=0
            if i<K:
                ans[i]=S
            else:
                ans[i]=1
                yok+=1
    
        ans[K-1]-=yok
    
    for i in range(N):
        print(ans[i],end=" ")

    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    S = int(next(tokens))  # type: int
    solve(N, K, S)

if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/env python3
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


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    S = int(next(tokens))  # type: int
    solve(N, K, S)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
import sys


def solve(N: int, K: int, S: int):
    if K==0:
        if S>N:
            ans=[0]*N
        else:
            ans=[N+1]*N
    if K==N:
        ans=[S]*N

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

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

    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    S = int(next(tokens))  # type: int
    solve(N, K, S)

if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/env python3
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


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    S = int(next(tokens))  # type: int
    solve(N, K, S)

if __name__ == '__main__':
    main()