Harryxun/stf_run huggingface dataset:
from collections import defaultdict
import sys
input = sys.stdin.readline

N, M = [int(item) for item in input().split()]
A = [int(item) for item in input().split()]
A.sort()

new_dict = defaultdict(lambda: 0)
for i in range(M):
    b, c = [int(item) for item in input().split()]
    new_dict[c] += b
new_dict = sorted(new_dict.items(), key=lambda x: -x[0])

new_list = []
if M > 0:
    for k, v in new_dict:
        new_list += ([k] * v)
        if len(new_list) >= N:
            break

new_list = new_list[:N]

#####

n = min(N, len(new_list))
for i in range(n):
    if A[i] >= new_list[i]:
        break
    A[i] = new_list[i]

print(sum(A))


### FIXED CODE ###

from collections import defaultdict
import sys
input = sys.stdin.readline

N, M = [int(item) for item in input().split()]
A = [int(item) for item in input().split()]
A.sort()

new_dict = defaultdict(lambda: 0)
for i in range(M):
    b, c = [int(item) for item in input().split()]
    new_dict[c] += b
new_dict = sorted(new_dict.items(), key=lambda x: -x[0])

new_list = []
for k, v in new_dict:
    if v > N:
        v = N
    new_list += [k] * v
    if len(new_list) >= N:
        break

new_list = new_list[:N]

#####

n = min(N, len(new_list))
for i in range(n):
    if A[i] >= new_list[i]:
        break
    A[i] = new_list[i]

print(sum(A))
# url: https://atcoder.jp/contests/dp/tasks
from functools import lru_cache
k=int(input())
a=list(map(int,input().split()))

@lru_cache(maxsize=None)
def f(idx,cost):
    if idx==k-1:
        return cost
    return min([
       f(idx+i,cost+abs(a[idx]-a[idx+i])) for i in [1,2]
        if idx+i<=k-1
    ])
print(f(0,0))

### FIXED CODE ###

k=int(input())
a=list(map(int,input().split()))
if k==1:
    print(0)
else:
    dp = [0] * k
    dp[1] = abs(a[0]-a[1])
    for i in range(2,k):
        dp[i]=min(
            dp[i-1]+abs(a[i]-a[i-1]),
            dp[i-2]+abs(a[i]-a[i-2])
        )
    print(dp[-1])
a,b = map(int, input(),split())

if (a*b)%2 == 0:
  print("Even")
  
else:
  print("Odd")

### FIXED CODE ###

a,b = map(int, input().split())
 
if (a*b)%2 == 0:
  print("Even")
  
else:
  print("Odd")
x, n = map(int, input().split())
p = sorted(list(map(int, input().split())))
l = [int(i) for i in range(1, 101)]
ll = []
for idx in l:
    if idx not in p:
        ll.append(idx)
mn = abs(ll[0] - x)
ans = ll[0]
for i in range(len(ll)):
    if abs(ll[i] - x) < mn:
        mn = abs(ll[i] - x)
        ans = ll[i]
print(ans)

### FIXED CODE ###

x, n = map(int, input().split())
p = sorted(list(map(int, input().split())))
l = [int(i) for i in range(-200, 201)]
ll = []
for idx in l:
    if idx not in p:
        ll.append(idx)
mn = 1000
if len(ll) == 0:
    print("")
else:
    mn = 1000
    for i in range(len(ll)):
        if abs(ll[i] - x) < mn:
            mn = abs(ll[i] - x)
            ans = ll[i]
    print(ans)
import numpy as np
N = int(input())


def make_prime(U):
    is_prime = np.zeros(U, np.bool)
    is_prime[2] = 1
    is_prime[3::2] = 1
    M = int(U**.5) + 1
    for p in range(3, M, 2):
        if is_prime[p]:
            is_prime[p * p::p + p] = 0
    return is_prime, is_prime.nonzero()[0]


def f(n):
    cnt = 0
    i = 0
    if n == 1:
        return 1
    for i in range(1, n + 1):
        if i * i > n:
            break
        if n % i == 0:
            cnt += 2
    if (i - 1) * (i - 1) == n:
        cnt -= 1
    return cnt


# D = [0] * (N + 1)
is_prime, is_prime_value = make_prime(N + 1)
D = np.zeros(N + 1, dtype='int')
D[is_prime] = 2

ans = 0
for i in range(1, N + 1):
    if D[i] == 0:

        cnt = 0
        j = 0
        if i == 1:
            D[i] = 1
        for j in range(1, i + 1):
            if j * j > i:
                break
            if j * j == i:
                if j in is_prime_value:
                    D[i] += D[i // j] + 1
                    break
                else:
                    cnt += 1
            if i % j == 0:
                if j in is_prime_value:
                    D[i] += D[n // j] + 2
                    break
                else:
                    cnt += 2
        else:
            D[i] = cnt
        # v = f(i)
        # D[i] = v
        # ans += v * i
    ans += D[i] * i
    # print('i, f(i)', i, f(i))
print(ans)


### FIXED CODE ###

from math import floor
N = int(input())


def g(X):
    Y = floor(N / X)
    return Y * (Y + 1) * X // 2


ans = 0
for i in range(1, N + 1):
    ans += g(i)

print(ans)
i = 0
while True:
    a,b,c = list(map(int,input().split()))
    for d in range(a, b+1):
        if (c % d ==0):
            i +=1
    print(str(i))

### FIXED CODE ###

a,b,c = map(int, input().split())
Answer = 0
for i in range(a,b+1):
    if c % i == 0:
        Answer = Answer + 1
print(Answer)
from operator import mul
from functools import reduce


def cmb(n, r):
    r = min(n - r, r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1, r + 1))
    return over // under


def p_d():
    N, K = map(int, input().split())
    n = N - K + 1
    mod = 10 ** 9 + 7

    for i in range(1, K + 1):
        # print(i ** (K - i))
        ans = cmb(n, i) * i ** (K - i) % mod
        print(ans)


if __name__ == '__main__':
    p_d()


### FIXED CODE ###

from math import factorial


def cmb(n, r):
    return factorial(n) // factorial(r) // factorial(abs(n - r))


def p_d():
    N, K = map(int, input().split())
    n = N - K + 1
    mod = 10 ** 9 + 7

    for i in range(1, K + 1):
        c = cmb(n, i)
        k = cmb(K - 1, i - 1)
        print(c * k % mod)


if __name__ == '__main__':
    p_d()
a=input().sprit(" ")
if int(a[0]) + int(a[1]) >= int(a[2]):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

A, B, C = map(int, input().split())

if A+B>=C:
  print("Yes")
else:
  print("No")
n = len(s)
sa = s[:(n-1)//2]
sb = s[(n+3)//2-1:n]
if s == s[::-1] and sa == sa[::-1] and sb == sb[::-1]:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

s = input()
n = len(s)
sa = s[:int((n-1)/2)]
sb = s[int((n+3)/2)-1:]
if s == s[::-1] and sa == sa[::-1] and sb == sb[::-1]:
    print("Yes")
else:
    print("No")
total_minute=D/S
 
if total_minute<=T:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

info=input().split()
 
D=int(info[0])
S=int(info[1])
T=int(info[2])
 
if D/S<=T:
  print('Yes')
else:
  print('No')
x,t = map(int(input()))
 
if x >= t:
  print(x-t)
else:
  print(0)

### FIXED CODE ###

x,t = map(int,input().split())
 
if x >= t:
  print(x-t)
else:
  print(0)
n , m = map(int , input().split())
edge = [[] for _ in range(m) ]
#print(edge)
for _ in range(m):
    a , b = map(int , input().split())
    a -= 1 ; b -= 1
    edge[a].append(b)
    edge[b].append(a)
#print(edge)

def DFS(s):
    global visited
    #ret=1 if all(visited) else 0
    if all(visited):
        ret = 1
    else:
        ret = 0
    for e in edge[s]:
        #print("e",e)
        if visited[e] == True:
            continue
        visited[e] = True
        ret += DFS(e)
        visited[e] = False
    return ret

visited = [False] * n
visited[0] = True
print(DFS[0])

### FIXED CODE ###

n , m = map(int , input().split())
edge = [[] for _ in range(n) ]
#print(edge)
for _ in range(m):
    a , b = map(int , input().split())
    a -= 1 ; b -= 1
    edge[a].append(b)
    edge[b].append(a)
#print(edge)

def DFS(s):
    global visited
    #ret=1 if all(visited) else 0
    if all(visited):
        ret = 1
    else:
        ret = 0
    for e in edge[s]:
        #print("e",e)
        if visited[e] == True:
            continue
        visited[e] = True
        ret += DFS(e)
        visited[e] = False
    return ret

ans = 0
visited = [False] * n
visited[0] = True
ans += DFS(0)
print(ans)
import collections


class unionFind:
    parent = []
    count = []

    def __init__(self, N):
        self.parent = [i for i in range(N)]
        self.count = [1]*N

    def root(self, x):
        if self.parent[x] == x:
            return(x)
        else:
            self.parent[x] = self.root(self.parent[x])
            self.count[x] = self.count[self.parent[x]]
            return(self.parent[x])

    def same(self, x, y):
        x, y = x-1, y-1
        return(self.root(x) == self.root(y))

    def unite(self, x, y):
        x, y = x-1, y-1
        x = self.root(x)
        y = self.root(y)
        if x == y:
            return
        else:
            self.parent[x] = y
            self.count[y] += self.count[x]
            self.count[x] = self.count[y]
            return

    def getCount(self, x):
        x = self.root(x)
        return(self.count[x])


N, M = map(int, input().split())
G = unionFind(N)
for i in range(M):
    a, b = map(int, input().split())
    G.unite(a, b)

ans = 1
for i in range(N):
    ans = max(ans, G.getCount(i))

print(ans)


### FIXED CODE ###

import collections
import sys
sys.setrecursionlimit(10**6)
N, M = map(int, input().split())
AB = [tuple(map(int, input().split())) for i in range(M)]


class unionFind:
    parent = []

    def __init__(self, N):
        self.parent = [i for i in range(N)]

    def root(self, x):
        if self.parent[x] == x:
            return(x)
        else:
            self.parent[x] = self.root(self.parent[x])
            return(self.parent[x])

    def same(self, x, y):
        x, y = x-1, y-1
        return(self.root(x) == self.root(y))

    def unite(self, x, y):
        x, y = x-1, y-1
        x = self.root(x)
        y = self.root(y)
        if x == y:
            return
        else:
            self.parent[x] = y
            return


G = unionFind(N)

for a, b in AB:
    G.unite(a, b)

for i in range(N):
    G.root(i)

C = collections.Counter(G.parent).most_common()

print(C[0][1])
from collections import defaultdict

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

d = defaultdict(int)

for key in a_li:
    d[key] += 1
d = sorted(d.items(), key=lambda x:x[1])

if k >= len(d):
    print(0)
    eixt()
    
s = len(d) - k
ans = 0

for i in range(s):
    ans += d[i][1]
    
print(ans)

### FIXED CODE ###

from collections import defaultdict

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

d = defaultdict(int)

for key in a_li:
    d[key] += 1
d = sorted(d.items(), key=lambda x:x[1])
    
s = len(d) - k
ans = 0

for i in range(s):
    ans += d[i][1]
    
print(ans)
import math
from functools import reduce
def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)


n = int(input())

a = list(map(int, input().split(' ')))

# 最大公倍数
target_num = lcm(*a)

b = []
for i in range(n):
    b.append(target_num//a[i])

print(sum(b) % (10**9+7))


### FIXED CODE ###

from fractions import gcd
from functools import reduce

def lcm_base(x, y):
    return (x * y) // gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)


n = int(input())

a = list(map(int, input().split(' ')))

# 最大公倍数
target_num = lcm(*a)

ans = 0
for i in range(n):
    ans += target_num//a[i]
#b = [target_num//num for num in a]

print(ans % (10**9+7))
import sys
import math
input = sys.stdin.readline


def main():
    MOD = 10 ** 9 + 7
    sc = Scan()
    n, m = sc.intarr()
    w = sc.intarr()
    is_safe = [True] * (n+2)
    for a in w:
        is_safe[a + 1] = False
    dp = [0] * (n+2)
    dp[1] = 1
    for i in range(2, n+2):
        if is_safe[i]:
            dp[i] = dp[i-1] + dp[i-2]
            dp[i] %= MOD
        else:
            dp[i] = 0

    print(dp[n+1])


class Scan():

    def intarr(self):
        line = input()
        array = line.split(' ')
        num_array = [int(n) for n in array]
        return num_array

    def strarr(self):
        line = input()
        array = line.split(' ')
        array[-1] = array[-1].strip('\n')
        return array


main()


### FIXED CODE ###

import sys
import math
input = sys.stdin.readline


def main():
    MOD = 10 ** 9 + 7
    sc = Scan()
    n, m = sc.intarr()
    w = sc.intarr_ver(m)
    is_safe = [True] * (n+2)
    for a in w:
        is_safe[a + 1] = False
    dp = [0] * (n+2)
    dp[1] = 1
    for i in range(2, n+2):
        if is_safe[i]:
            dp[i] = dp[i-1] + dp[i-2]
            dp[i] %= MOD
        else:
            dp[i] = 0

    print(dp[n+1])


class Scan():

    def intarr(self):
        line = input()
        array = line.split(' ')
        num_array = [int(n) for n in array]
        return num_array

    def intarr_ver(self, n):
        return [int(input()) for _ in range(n)]

    def strarr(self):
        line = input()
        array = line.split(' ')
        array[-1] = array[-1].strip('\n')
        return array


main()
#!/usr/bin/python3
# -*- coding: utf-8 -*-

import sys
#import bisect
#from collections import deque
import math

#############################
#         59 58 57     1
# Ai = 0xbi bi bi ... bi
# 
#############################

#############################
#   N-1 N
#   Σ   Σ     (Ai xor Aj)
#   i=1 j=i+1
#
#   59  N-1 N       d      d
# = Σ   Σ   Σ     (bi xor bj) * 2^(d-1)
#   d=1 i=1 j=i+1
#############################

#############################
#   N-1 N       d      d
#   Σ   Σ     (bi xor bj)
#   i=1 j=i+1
#
# = (bx のうち 1 の数) * (bx のうち 0 の数)
#############################

def input():
    return sys.stdin.readline().rstrip('\n')

N = int(input())
A = list(map(int, input().split()))

s = 0 #sum

for d in range(60):
    B = [1 & (a >> d)) for a in A]
    s += B.count(1) * B.count(0) * (2**d)
    #print(d,B,B.count(1),B.count(0),2**(d-1),s)

#print(s)
print(s % (10**9+7))


### FIXED CODE ###

#!/usr/bin/python3
# -*- coding: utf-8 -*-

import sys
#import bisect
#from collections import deque
import math

#############################
#         59 58 57     1
# Ai = 0xbi bi bi ... bi
# 
#############################

#############################
#   N-1 N
#   Σ   Σ     (Ai xor Aj)
#   i=1 j=i+1
#
#   59  N-1 N       d      d
# = Σ   Σ   Σ     (bi xor bj) * 2^(d-1)
#   d=1 i=1 j=i+1
#############################

#############################
#   N-1 N       d      d
#   Σ   Σ     (bi xor bj)
#   i=1 j=i+1
#
# = (bx のうち 1 の数) * (bx のうち 0 の数)
#############################

def input():
    return sys.stdin.readline().rstrip('\n')

N = int(input())
A = list(map(int, input().split()))

s = 0 #sum

for d in range(60):
    B = [1 & (a >> d) for a in A]
    s += B.count(1) * B.count(0) * (2**d)
    #print(d,B,B.count(1),B.count(0),2**(d-1),s)

#print(s)
print(s % (10**9+7))
a=int(input())
S=input()

if(A>=3200):
  print(S)
else:
  print("red")

### FIXED CODE ###

a=int(input())
S=input()

if(a>=3200):
  print(S)
else:
  print("red")
N, K, M = map(int, input().split())
A = list(map(int, input().split()))
 
if  N*M - sum(A) >= K:
    print('-1')
else:
  print(N*M - sum(A))

### FIXED CODE ###

tmp = input()
ans = chr(ord(tmp) + 1)
print(ans)
n,k=int(input())
s=input()
print(s[0:k-1]+s[k-1:k]+s[k:])

### FIXED CODE ###

n,k=map(int,input().split()) 
s=input() 
print(s[0:k-1]+s[k-1:k].lower()+s[k:])
# xの逆元は、x*y = 1 mod pとなるようなy
N, K = map(int, input().split())
mod = 10**9 + 7
a = N - K + 1
print(a)
for i in range(K-1):
    a = (a * (N - K - i) * (K - (i + 1)) // ((i+2) * (i+1))) % mod
    print(a)



### FIXED CODE ###

from collections import defaultdict
S = input()
D = defaultdict(int)
for s in S:
    D[s] += 1

def main(D):
    if len(D.keys()) != 2:
        return 0
    else:
        for v in D.values():
            if v != 2:
                return 0
    return 1

if main(D):
    print("Yes")
else:
    print("No")
from scipy.special import comb

N,M= map(int, input().split())
aList = [0] * M
for i in range(M):
    aList[i] = int(input())

aList.sort()
aList.append(N+1)

result = 1
MOD = 7+10**9
now = 0
for a in aList:
    if now == a:
        result = 0
        break

    x = (a - now - 1)
    root = 1
    for i in range(x//2, x):
        root += int(comb(x, (x-i+1), exact = False))
    result = result * root
    result = result % MOD
    now = a+1
print(result)

### FIXED CODE ###

# 再帰上限あげとく
import sys
sys.setrecursionlimit(10**6)

# 値入力
mod = 7+10**9
N,M = map(int, input().split())
a = [0]*M
for i in range(M):
    a[i] = int(input())

# メモ化フィボナッチ
# 参考:http://python-remrin.hatenadiary.jp/entry/2017/05/19/153228
fib_memo = {}
def fib(n):
    if n < 3: return 1
    if n not in fib_memo:
        fib_memo[n] = fib(n-1) + fib(n-2)
    return fib_memo[n]

now = 0 # 今いる場所と考える
count = 1
for i in a:
    count *= fib(i-now)
    count = count%mod
    if now == i:
        print(0)
        quit()
    now = i+1 # 穴を超えた次の段に移動する

# 最上段までを計算
count *= fib(N-now+1)
print(count%mod)
n=int(input())
p=list(map(int,input().split()))

cnt=0
for i in range(n):
    if p[i]==i+1:
        p[i],p[i+1]=p[i+1],p[i]
        cnt+=1
print(cnt)


### FIXED CODE ###

n=int(input())
p=list(map(int,input().split()))

p.append(0)
cnt=0
for i in range(n):
    if p[i]==i+1:
        p[i],p[i+1]=p[i+1],p[i]
        cnt+=1

print(cnt)
l = input().split()

print(min(l) + " " + min(l.remove(min(l))) + " " + max(l))

### FIXED CODE ###

l = list(map(int, input().split()))
l.sort()
for i in range(len(l)):
    if i == len(l)-1:
        print(l[i])
    else:
        print(l[i], end = " ")
from heapq import*
n,k=map(int,input().split())
*v,=map(int,input().split())
motimono=[]
ans=[]
if k>=n:
    motimono=v
    k-=n
    for i in range(k):
        heappop(motimono)
        ans.append(sum(motimono))
    print(max(ans))
else:
    v*=2
    for j in range(1,k+1):
        for i in range(n-j,n+1):
            motimono=v[i:i+j]
            ans.append(sum(motimono))
            heapify(motimono)
            for i in range(k-j):
                if len(motimono)>0:
                    heappop(motimono)
#                print(motimono)
                ans.append(sum(motimono))
    print(max(ans))


### FIXED CODE ###

from heapq import*
n,k=map(int,input().split())
*v,=map(int,input().split())
motimono=[]
ans=[]
if k>=n:
    k-=n
    heapify(v)
    ans.append(sum(v))
    for i in range(k):
        if len(v)>0:
            heappop(v)
        ans.append(sum(v))
    print(max(ans))
else:
    v*=2
    for j in range(1,k+1):
        for i in range(n-j,n+1):
            motimono=v[i:i+j]
            ans.append(sum(motimono))
            heapify(motimono)
            for i in range(k-j):
                if len(motimono)>0:
                    heappop(motimono)
                ans.append(sum(motimono))
    print(max(ans))
n, m, x = map(int, input().split())
a = list(map(int, input().split()))
cost_0, cost_n = 0, 0

if max(a) <= x or min(a) >= x:
    print(0)
    exit(1)

for i in range(1, x):
    if i in a:
        cost_0 += 1

for i in range(x + 1, n):
    if i in a:
        cost_n += 1

print(min(cost_0, cost_n))

### FIXED CODE ###

n, m, x = map(int, input().split())
a = list(map(int, input().split()))
cost_0, cost_n = 0, 0

# if max(a) <= x or min(a) >= x:
#     print(0)
#     exit(1)

for i in range(1, x):
    if i in a:
        cost_0 += 1

for i in range(x + 1, n):
    if i in a:
        cost_n += 1

print(min(cost_0, cost_n))
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

A,B,C=map(int,input().split())
K=map(int,input().split())
while A<=B:
    B*=2
    K-=1
while B<=C:
    C*=2
    K-=1
print(K>=0)

### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

A,B,C=map(int,input().split())
K=int(input())
while A>=B:
    B*=2
    K-=1
while B>=C:
    C*=2
    K-=1
YesNo(K>=0)
#input
s = input()
t = input()

#output
m = len(s)
n = len(t)
dp = [[0]*(m+1) for _ in range(n+1)]

for i in range(m):
    for j in range(n):
        if s[i] == t[j]:
            dp[i+1][j+1] = dp[i][j]+1
        else:
            dp[i+1][j+1] = max(dp[i][j+1], dp[i+1][j])

ans = ""
while m > 0 and n > 0:
    if dp[m][n] == dp[m-1][n]:
        m -= 1
    elif dp[m][n] == dp[m][n-1]:
        n -= 1
    elif dp[m][n] == dp[m-1][n-1] + 1:
        ans += t[n-1]
        m -= 1
        n -= 1

print(ans[::-1])

### FIXED CODE ###

#input
s = input()
t = input()

#output
m = len(s)
n = len(t)
dp = [[0]*(m+1) for _ in range(n+1)]

for i in range(n):
    for j in range(m):
        if t[i] == s[j]:
            dp[i+1][j+1] = dp[i][j]+1
        else:
            dp[i+1][j+1] = max(dp[i][j+1], dp[i+1][j])

ans = ""
while m > 0 and n > 0:
    if dp[n][m] == dp[n-1][m]:
        n -= 1
    elif dp[n][m] == dp[n][m-1]:
        m -= 1
    elif dp[n][m] == dp[n-1][m-1] + 1:
        ans += t[n-1]
        n -= 1
        m -= 1

print(ans[::-1])
t,x = map(float,input(),split())
print(t / x)

### FIXED CODE ###

t,x = map(float, input().split())
print(t/x)
a  = ''.join(list(map(input().split())))

print('YES' if (int(a))%4==0 else 'NO')


### FIXED CODE ###

a  = ''.join(list(input().split()))

print('YES' if (int(a))%4==0 else 'NO')
n, m = map(int, input().split())
L = [0] * n
for i in range(m):
    a, b = map(int, input().split())
    L[a - 1] += 1
    L[b - 1] += 1

for i in L:
    pront(i)

### FIXED CODE ###

n, m = map(int, input().split())
L = [0] * n
for i in range(m):
    a, b = map(int, input().split())
    L[a - 1] += 1
    L[b - 1] += 1

for i in L:
    print(i)
import sys
import os
f = open('input.txt','r')
sys.stdin = f

b = input()
out = ""

if b == "A":
    out = "T"
elif b == "C":
    out = "G"
elif b == "G":
    out = "C"
else:
    out = "A"
print(out)


### FIXED CODE ###

b = input()
out = ""

if b == "A":
    out = "T"
elif b == "C":
    out = "G"
elif b == "G":
    out = "C"
else:
    out = "A"
print(out)
from math import ceil


n = int(input())
print(111 * ceil(n // 111)
      

### FIXED CODE ###

import math


n = int(input())
print(111 * math.ceil(n / 111))
n = input()
s = [''.join(sorted(input())) for i in range(n)]
count = 0
for i in range(n):
  for j in range(i+1,n):
    if s[j][0]==s[i][0]:
      count+=1
print(count)

### FIXED CODE ###

n = int(input())
d = dict()
for i in range(n):
  S = ''.join(sorted(list(input())))
  if S in d.keys():
    d[S] +=1
  else:
    d[S] = 1
 
ans = 0
for i in d.values():
  ans += i*(i-1)//2
print(ans)
n = int(input())
a = list(map(int, input().split()))
ans = [0 for i in range(n)]
for i in reversed(range(1, n+1)):
    ans[a.pop()] = i
    
print(*ans)



### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))

ans = [0 for i in range(n)]
for i, name in enumerate(a):
    ans[name-1] = i+1
print(*ans)
import sys
# from collections import defaultdict, deque
# import math
# import copy
from bisect import bisect_left, bisect_right
# import heapq

# sys.setrecursionlimit(1000000)

# input aliases
input = sys.stdin.readline

getS = lambda: input().strip()
getN = lambda: int(input())
getList = lambda: list(map(int, input().split()))
getZList = lambda: [int(x) - 1 for x in input().split()]

INF = 10 ** 20
MOD = 10 ** 9 + 7
def solve():
    n, k, s = getList()
    fill = s // k
    if s > 10 ** 6:
        out = 1
    else:
        out = 10 ** 9
    ans = [out for i in range(n - k)] + [s for i in range(k)] #] + [0 for i in range(k-1)]

    print(*ans)

def main():
    n = getN()
    for _ in range(n):
        solve()
if __name__ == "__main__":
    # main()
    solve()


### FIXED CODE ###

import sys
# from collections import defaultdict, deque
# import math
# import copy
from bisect import bisect_left, bisect_right
# import heapq

# sys.setrecursionlimit(1000000)

# input aliases
input = sys.stdin.readline

getS = lambda: input().strip()
getN = lambda: int(input())
getList = lambda: list(map(int, input().split()))
getZList = lambda: [int(x) - 1 for x in input().split()]

INF = 10 ** 20
MOD = 10 ** 9 + 7
def solve():
    n, k, s = getList()
    if s > 10 ** 6:
        out = 1
    else:
        out = 10 ** 9
    ans = [out for i in range(n - k)] + [s for i in range(k)] #] + [0 for i in range(k-1)]

    print(*ans)

def main():
    n = getN()
    for _ in range(n):
        solve()
if __name__ == "__main__":
    # main()
    solve()