peterverebics/CodeNet_Python_118 huggingface dataset:
n,k,s=map(int,input().split())
l=[]
if s%2==0:
  for i in range(k):
    print(s//2)
  for i in range(1,s+1):
    if i!=s//2 and (i not in l):
      l.append(i)
      if len(l)==n-k-1:
        l.append(s-sum(l))
        break
  for i in l:
    print(i)
else:
  for i in range(k):
    print(s)
  for i in range(n-k):
    print(s+1)
n, k, s = map(int, input().split())
if s!=10**9:
  l = [s] * k + [s+1] * (n-k)
else:
  l = [s] * k + [s-1] * (n-k)
print(l)
N, K, S = map(int, input().split())
lis = []
for i in range(K):
  lis.append(S)
for i in range(N-K):
  lis.append(S*2)
print(*lis)
n,k,s = map(int,input().split())
if s != 10**9:
    ans = [str(s)]*k + [str(10**9)]*(n-k)
else:
    ans = [str(s)]*k + [str(0)]*(n-k)
print(" ".join(ans))
n,k,s = map(int,input().split())
l = [s for i in range(k)]
l1 = [1 for i in range(n-k)]
print(l+l1)
n, k, s = map(int,input().split())

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

ans=[s]*k
if s==2:
    zeros=[3]*(n-k)
else:
    zeros=[s-1]*(n-k)
ans.extend(zeros)

print(*ans)
import sys


def input():
    return sys.stdin.readline().strip()


sys.setrecursionlimit(10 ** 9)


def main():
    N, K, S = map(int, input().split())
    A = [S for _ in range(K)]
    B = [S + 1 for _ in range(N - K)]
    C = A + B
    print(*C, sep=" ")


if __name__ == "__main__":
    main()
N,K,S=[int(x) for x in input().rstrip().split()]

if S%2==0:
    mi=S//2
    ma=S//2
else:
    mi=S//2
    ma=S//2+1
A=[]
cnt=0

for i in range(N):
    if K+1<=cnt:
        A.append(111)
    else:
        if i%2==0:
            A.append(mi)
        else:
            A.append(ma)
        cnt+=1
        
print(*A)
N,K,S = map(int,input().split())

M = N-K
ans = [S]*(K-1)+[S-M]+[1]*M
print(*ans)
N,K,S=map(int,input().split())
ans=[S]*K+[S+1]*(N-K)
print(*ans)
N, K, S = map(int, input().split())
X = [S] * K
Y = [S - 1] * (N - K)
Z = X+Y

print(*Z,sep=" ")
n, k, s = map(int, input().split())
cnt = 0

for i in range(n):
    if cnt >= k:
        print(s+1, end=" ")
    else:
        print(s, end=" ")
    cnt += 1
N, K, S = map(int, input().split())
A = [0]*N
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)))
N, K, S = map(int, input().split())
A = [0]*N
cnt = 0
for i in range(N):
  A[i] = S
  cnt += 1
  if cnt == K:
    S -= 1
    if S==0:
      S += 2
print(*A)
n, k, s = map(int, input().split())

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



#条件を満たさない場合を考えてみる
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(max(S-1,1))
    else:
      ans += str(max(S-1,1)) + " "
    
print(ans)
N, K, S = map(int, input().split())
arr = [S + 1 if S != 10 ** 9 else S - 1] * N
for i in range(K):
    arr[i] = S
print(arr)
n, k, s = map(int, input().split())

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

print(*l)
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+1000000000
print(*ans)
N, K, S = map(int, input().split())
print([S] * K + [S+1] * (N-K))
n,k,s=map(int,input().split())
a=[]

for i in range(k):
        a.append(s)
for i in range(n-k):
        a.append(s-2)
print(*a)
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))

print(array)
n,k,s=map(int,input().split())
if k==n:
    x=[s]*n
    print(" ".join(map(str,x)))
else:
    x=[s]*k
    y=[s+1]*(n-k)
    z=" ".join(map(str,x))+" "+" ".join(map(str,y))
    print(z)
n, k, s = map(int, input().split())
ans = ''
for i in range(n):
  if i < k:
    ans += str(s) + ' '
  else:
    ans += str(s+1) + ' '
print(ans[:-1])
import sys
input = sys.stdin.readline


def main():
    N, K, S = [int(x) for x in input().split()]

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

    print(*ans)



if __name__ == '__main__':
    main()
N,K,S=map(int,input().split())
ans=[S]*K
ans.extend([S+1]*(N-K))
print(*ans)
N,K,S = map(int,input().split())
ans = [S]*K+[S+1]*(N-K)
print(*ans)
# -*- coding: utf-8 -*-

N, K, S = map(int, input().split())
a = []
for i in range(K):
    a.append(S)
for i in range(N-K):
    a.append(S+1)
print(a)
import math

def f(n,k,s):
  
  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)
# Problem C - Subarray Sum

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

# initialization
ans_list = [0]*(N)

# check
for i in range(K):
    ans_list[i] = S
for i in range(K, N):
    ans_list[i] = S + 1

# output
print(" ".join(list(map(str, ans_list))))
n,k,s = map(int,input().split())

if n == 1000000000:
    l = [str(1) for i in range(n)]
else:
    l = [str(s+1) for i in range(n)]

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

print(' '.join(l))
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)
n, k, s = map(int, input().split())
ans = [s]*k + [s+1]*(n-k)
print(*ans)
n, k, s = map(int, input().split())
L = [0] * n
for i in range(n):
    if i < k:
        L[i] = s
    else:
        L[i] = s + 1
print(*L)
n,k,s = map(int,input().split())

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

for i in range(n-k):
  print(1, end="")
  print(" ", end="")
N,K,S=[int(i) for i in input().split()]
res=[10**9+1]*N
for i in range(K):
    res[i]=S
print(*res)
# coding: utf-8
# Your code here!
N,K,S=map(int,input().split())
ans=[]
p=N-K
if p==N:
    for i in range(N):
        ans.append(str(S+1))
else:
    for i in range(N-K):
        ans.append(str(S+1))
    for i in range(K):
        ans.append(str(S))

#print(ans)
ans=' '.join(ans)
print(ans)
n,k,s=map(int,input().split())
for i in range(k):
  print(s)
for i in range(n-k):
  print(s+1)
# coding: utf-8

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

if S < 10**9:
    for _ in range(K):
        print(S, end=" ")
    for _ in range(N-K-1):
        print(S+1, end=" ")
    print(S+1)
else:
    for _ in range(K):
        print(S, end=" ")
    for _ in range(N-K-1):
        print(S-1, end=" ")
    print(S-1)
n,k,s=map(int,input().split())
a=[]

for i in range(k):
        a.append(s)
for i in range(n-k):
        a.append(s+1)
print(*a)
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)
    else:
        if i <= k:
            if i % 2 == 0:
                ans.append(o)
            else:
                ans.append(e)
        else:
            ans.append(0)
print(*ans)
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(arr)
print(" ".join(arr))
n, k, s = map(int, input().split())

a = [s * 2 for i in range(n)]

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

print(" ".join(map(str,a)))
n, k, s = map(int, input().split())

ans = [s]* k + [1]*(n-k)
print(' '.join(map(str, ans)))
N,K,S = map(int,input().split())
X = [0 for _ in range(N)]
ans=""
for i in range (K):
    X[i]=S

for i in range(N):
    ans=ans+" "+str(X[i])

print(ans)
import sys
input = sys.stdin.readline
N, K, S = [int(x) for x in input().split()]
ans = [S] * K
ans += [(10 ** 9) - S] * (N - K)
print(*ans)
n,k,s = map(int,input().split())

L = [1,s-1]
li = []

if k == 0:
    li = [s-1]*n
    print(*li)
    exit()
if n == 1:
    li = [s]
    print(*li)
    exit()
    
if s < 10**9:
    if k%2 == 1:
        li = L*(k//2+1)
    else:
        li = L*(k//2) + [1]

    li = li + [s+1] *(n-len(li))
    print(*li)
    exit()
elif s == 10**9:
    li = [s]*k + [1]*(n-k)
    print(*li)
N,K,S=map(int,input().split())

for _ in range(K):
    print(S,end=' ')
for _ in range(N-K):
    print(S+100,end=' ')
print('')
import math


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


print(n,k,s)

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


blank = pow(10,9)
if s == blank:
    blank = 1

for i in range(k,n):
    text = " "
    if  i == n-1:
        text = ""
    print(blank,end=text)
print()
n,k,s=map(int,input().split())
a=[1 for i in range(n)]
for i in range(k):
    a[i]=s
for i in range(k,n):
    a[i]+=s
print(*a)
N,K,S = map(int,input().split())

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

ans = ' '.join(ans)
print(ans)
n, k, s = map(int, input().split())
if k == n:
    print(" ".join([str(s) for _ in range(n)]))
    exit()
x = 0
arr = [1]
while True:
    if x == k:
        break
    arr.append(s - arr[-1])
    x += 1
while len(arr) < n:
    arr.append(10 ** 9 + 10)

print(" ".join(list(map(str, arr))))
n,k,s=map(int,input().split())

ans=[]
ans+=[s for i in range(k)]
ans+=[s+1 if s<10**9 else 1 for i in range(k,n)]
print(ans)
N,K,S = map(int,input().split())
for i in range(K):
	print(S,end = " ")
for i in range(N - K):
	print(10**10,end = " ")
print("")
N,K,S = [int(hoge) for hoge in input().split()]
#累積和数列であって、Ar-Al=Sを満たすものが丁度K個ある
print(*([S]*K + [S+1]*(N-K)))
n, k, s = map(int, input().split())

ans = []
for i in range(k):
  ans.append(s)
for j in range(n-k):
  ans.append(s+1)

print(*ans)
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)
print(*ans)
import sys
input = sys.stdin.readline
n,k,s=map(int,input().split())

ans=[]
for i in range(n-k):
    ans.append(1 if s!=1 else 2)
for i in range(k):
    ans.append(s)
print(*ans)
from sys import stdin

n, k, s = map(int, stdin.readline().rstrip().split())
flag = 0

for i in range(n):
    if flag < k:
        print(s)
        flag += 1
    else:
        if s == 10 ^ 9 and s != 1:
            print(s-1)
        else:
            print(1)
N,K,S=map(int,input().split())
A=[]
for i in range(K):
  A.append(S)
for i in range(N-K):
  A.append(S+1)

print(*A)
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    """
    sum[Al,,,Ar] = Sの部分和がちょうどK個。
    """
    n, k, s = map(int, input().split())
    if n == k:
        r = [s] * k
    else:
        if s != 1:
            r = [s] * (k - 1) + [s - 1] * 1 + [1] * 1 + [1000000000] * (n - k - 1)
        else:
            r = [1] * k + [1000000000] * (n - k)
    print(*r, sep=' ')

if __name__ == '__main__':
    main()
N, K, S = map(int, input().split())
U = str(S + 1)
S = str(S)
ans = [S if i <= K - 1 else U for i in range(N)]
print(" ".join(ans))
N, K, S = map(int, input().split())
ans = [S] * K
ans.extend([10 ** 9 + 1] * (N - K))
print(' '.join([str(x) for x in ans]))
n,k,s = map(int,input().split())
ans = []
for i in range(k):
  ans.append(str(s))
  
for j in range(n-k):
  ans.append(str(s-1))
print(' '.join(ans))
n, k, s = map(int, input().split())
s1 = str(s)
if n - k - s <= 0:
    print((s1 + " ") * (k - 1) + '1 ' * (n - k) + str(s - n + k))
else:
    c = 0
    while(n - s > 0):
        if s - c > 2:
            c += 1
            print('1', end = ' ')
        else:
            print('2', end = ' ')
            c = 0
        n -= 1
    print(str(s - c), end = ' ')
    print('1 ' * (n - 1))
n,k,s = [int(i) for i in input().split()]

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

s = 1 if s==10**0 else s+1

for i in range(k+1,n):
    print(" "+str(s),end="")
N,K,S = map(int,input().split())
import numpy as np
ans = np.array([S+1]*N)
ans[0:K]=S
ans = list(ans)
print(' '.join(map(str,ans)))
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)
n,k,s = map(int,input().split())

for i in range(k):
    print(s)
for i in range(n-k):
    print(s//(n-k+1))
N, K, S = map(int,input().split())

ans = [S for a in range(K)]
ain = [S+1 for a in range(N-K)]
ans = ans + ain
print(ans)
N, K, S = map(int, input().split())

ans = [S] * K + [10 ** 9 if S != 10 ** 9 else 1] * (N)
print(*ans)
n, k, s = map(int, input().split())
l = []
for i in range(k):
    l.append(str(s))
for j in range(n-k):
    l.append(str(s+100000))
print(" ".join(l))
a, b, k = map(int, input().split())

if a >= k:
  print(a-k, b)
else:
  if b - (k-a) >= 0:
    print(0, b - (k-a))
  else:
    print(0, 0)
A, B, K = map(int, input().split())

a = max(A - K, 0)	#食べ残しと０とを比較して大きい方を返す
K -= A - a			#食べた分の枚数を、残りの食べる予定量から減らす
b = max(B - K, 0)	#もし負になったら０を返す

print("{} {}".format(a, b))
A, B, K = map(int, input().split())

if A >= K:
    print(A - K, B)
elif A + B >= K:
    print(0, B - (K - A))
else:
    print(0, 0)
A,B,K = list(map(int,input().split()))
if K <= A:
  print(A-K," ",B)
else:
  print(0," ",max(A+B-K,0))
A, B, K = map(int, input().split())
if K <= A:
    print(A-K, B)
elif K <= A+B:
    print(0, B-(K-A))
else:
    print(0, 0)
A, B, K = map(int, input().split())

A = A - K
if A>=0:
  print(A, B)
  exit()

B = B + A
A = 0

print(A, max(B, 0))
a, b, k = map(int, input().split())
a1 = a
b1 = b
if k <= a:
    a1 -= k
elif k <= a + b:
    a1 = 0
    b1 -= k - a
else:
    a1 = 0
    b1 = 0
print(a1, b1)
a,b,k = list(map(int,input().split(' ')))
"""takahashi has a
   aoki has b
   loop k

for _ in range(k):
  if a >= 1:
    a -= 1
  elif b >= 1:
    b -= 1
  elif a == 0 and b == 0:
    break
"""
if a <= k:
  k -= a
  a = 0
else:
  a -= k
  k = 0

#print('a,k',a,k)  

if b <= k:
  k -= b
  b = 0
else: 
  b -=k
  k = 0

#print('b,k',b,k)  
  
print(a,b)
import sys

def stdin_parse_int():
    a = list(map(int,input().split()))
    return a

list = stdin_parse_int()
A = list[0]
B = list[1]
K = list[2]

if A > K:
    print(str(A-K) + " " + str(B))
elif A+B > K:
    print(str(0) + " " + str(A+B-K))
else:
    print("0 0")
taka, aoki, num = map(int, input().split())
if taka <= num:
  num -= taka
  taka = 0
  if aoki <= num:
    aoki = 0
    print(taka, aoki)
  elif aoki > num:
    aoki -= num
    print(taka, aoki)  
if taka > num:
  taka -= num
  print(taka, aoki)
a, b, k = map(int, input().split())

if k <= a:
    print(a-k, b)
else:
    print(0, max(a+b-k, 0))
a , b, k = (int(x) for x in input().split())

if k > a:
    if b - k + a <= 0:
        b = 0
        a = 0
    else:
        b = b - k + a
        a = 0
    
else:
    a = a - k 


print(a,b)
A,B,K = list(map(int,input().split()))
if K <= A:
  print('{} {}'.format(A-K,B))
if A < K <= A+B:
  print('{} {}'.format(0,A+B-K))
if A+B < K:
  print('{} {}'.format(0,0))
a,b,k=map(int,input().split())
print(max(0,a-k),max(0,b-max(0,k-a)))
def main():
    A, B, K = map(int, input().split())
    if K <= A:
        print(A - K, B)
    elif K <= A + B:
        print(0, B - (K - A))
    else:
        print(0, 0)


if __name__ == "__main__":
    main()
A,B,K = map(int,input().split())
if A-K>=0:
    print(A-K,B)
else:
    K-=A
    if B-K>=0:
        print(0,B-K)
    else:
        print(0,0)
a, b, k = map(int, input().split())

if a >= k:
  c = a-k
  e = "{0} {1}".format(c, b)
  print(e)
  
elif a < k <= a + b:
  c = b + a - k
  e = "{0} {1}".format(0, c)
  print(e)

else:
  print('0' +' ' +  '0')
A, B, K = map(int, input().split())

d = min(A, K)
#print('d:', d)
A -= d
K -= d
d = min(B, K)
#print('d:', d)
B -= d
K -= d

print(A, B)
def main():
    a,b,k = map(int,input().split())
    if a >= k:
        a-=k
    else:
        b -= (k - a)
        a = 0
        if b < 0:
            b = 0
    print(str(a)+" "+str(b))
main()
a,b,k=map(int,input().split())

if a>=k:
    a-=k
elif a+b>=k:
    b-=k-a
    a=0
else:
    a=0
    b=0

print('{} {}'.format(a,b))
A,B,K=map(int,input().split())
if A>K:print(A-K,B)
elif A+B>K:print(0,A+B-K)
else:print(0,0)
a, b, k = map(int, input().split())
if k <= a:
  print('{} {}'.format(a-k, b))
else:
  k -= a
  print('{} {}'.format(0, max(b-k, 0)))
A,B,K=map(int, input().split())
b=0
res=0
if A<=K:
    B=max(b,B-(K-A))
    A=0
else:
    A=A-K
print(A,B)
A, B, K = map(int, input().split())

tak = A
aok = B

if K < A:
    tak = A - K
elif A <= K < A + B:
    tak = 0
    aok = B - (K - A)
else:
    tak = 0
    aok = 0

print(tak, aok)
# coding: utf-8
# Your code here!
A,B,K=map(int,input().split())

if A<=K:
    K-=A
    A=0
    if B<=K:
        print(0, end=' ')
        print(0)
    else:
        B-=K
        print(A,end=' ')
        print(B)

else:
    A-=K
    print(A,end=' ')
    print(B)
a, b, k = map(int, input().split())


if k <= a:
    print(a-k, b)
elif k <= a + b:
    print(0, b-k+a)
else:
    print(0, 0)
A, B, K = list(map(int, input().split()))

if A <= K:
    K = K - A
    A = 0
    if B <= K:
        K = K - B
        B = 0
    else:
        B = B - K
else:
    A = A - K 
        
print(str(A) + ' ' + str(B))
A, B, K = map(int, input().split())

if K - A <= 0:
    print(str(A - K) + ' ' + str(B))
else:
    print('0 ' + str(max(0, B - (K - A))))
A,B,K=map(int,input().split())
if K>=A+B:
    print(0,0)
elif K>=A:
    print(0,A+B-K)
else:
    print(A-K,B)
A, B, K = map(int, input().split())
 
if K <= A:
  print(A-K, B)
elif A+B >= K > A:
  print(0, B-(K-A))
else:
  print(0, 0)
a, b, k = map(int, input().split())
if k > a:
    if k > a + b:
        print(0, 0)
    else: print(0, a + b - k)
else: print(a - k, b)
a,b,k = map(int,input().split())
if a>=k:
    print(a-k,b)
else:
    print(0,max(0,a+b-k))
a,b,k=map(int,input().split())
if a>k:
  a-=k
  k=0
else:
  k-=a
  a=0
b=max(0,b-k)
print(a,b)
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))

a, b, k = map(int, input().split())

if (a > 0):
    if (a >= k):
        a -= k
        print (a,b)
        exit()
    else:
        k -= a
        a = 0

if (b > 0):
    if (b >= k):
        b -= k
        print(a,b)
        exit()
    else:
        b = 0


print(a,b)
a, b, k = map(int, input().split())
print(max(0, a-k), max(0, b-(0 if a >= k else k-a)))
A, B, K = map(int, input().split())

e = min([K, A])
a = A - e
e = min([K-e, B])
b = B - e
print(a, b)
A,B,K = map(int, open(0).read().split())
if K <= A:
    print(A-K,B)
elif K >= A + B:
    print(0,0)
else:
    print(0,B-K+A)
A,B,K=map(int,input().split())
if A+B-K<=0:
  print(0,0)
elif A-K<=0:
  print(0,A+B-K)
else:
  print(A-K,B)
a,b,k = map(int,input().split(" "))
if a + b <= k:
    print("0 0")
elif a <= k:
    print("0 " + str(b+a-k))
else:
    print(str(a-k) + " " + str(b))
A,B,K = map(int, input().split())

if A >= K:
    A = A - K
    #B = B
elif A+B >= K:
    B = A + B - K
    A = 0
elif A+B < K:
    A, B =0, 0
print(A, B)
A,B,K=map(int,input().split())
if A-K>=0:
  print(A-K,B)
else:
  B=B-(K-A)
  if B<=0:
    print(0,0)
  else:
    print(0,B)
A, B, K = map(int, input().split())
if K > (A + B):
  print(0, 0) 
elif A > K: 
  print(A - K, B)
else:
  print(0, A + B - K)
A,B,K = map(int, input().split())

print(A-K, B) if K <= A else print(0,0) if (A+B) <= K else print(0, A+B-K)
# import math
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np


a,b,k = map(int, input().split())
# n = int(input())
# p = list(map(int, input().split()))

if a < k and b > k-a:
    print(0,a+b-k)
elif a >= k:
    print(a-k,b)
else: print(0,0)
a, b, k = map(int, input().split())
ca = a-k
if ca >= 0:
    print(ca, b)
else:
    cb = b + ca
    if cb < 0:
        print(0, 0)
    else:
        print(0, cb)
A, B, K = map(int, input().split())
taka,aoki = 0, 0
taka = max(0,A-K)
aoki = max(0,B + min(0,A-K))
print(taka,aoki)
import sys

A, B, K = map(int, input().split())
if A >= K:
	A -= K
	print(A, B)
	sys.exit()

else:
	K -= A
	A = 0

	if B >= K:
		B -= K
	else:
		B = 0

	print(A, B)
A, B, K = map(int,input().split())
if A + B <= K:
    a = 0
    b = 0
else:
    if K == 0:
        a = A
        b = B
    elif K > A:
        a = 0
        b = abs(B-(K-A))
    elif K == A:
        a = 0
        b = B
    elif K < A:
        a = A - K
        b = B
print(a,b)
def solve(string):
    a, b, k = map(int, string.split())
    return "{} {}".format(max(0, a - k), max(0, min(b, a + b - k)))


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))
a, b, k = map(int, input().split(' '))

if a >= k:
  print(a - k, b)
elif a + b >= k:
  print(0, b - (k - a))
else:
  print(0, 0)
a,b,k=map(int,input().split())
print(max(a-k,0), max(b-max(k-a, 0), 0))
a, b, k = map(int, input().split())
if k<=a:
    print(a-k, b)
elif a<k and k<=(a+b):
    print(0, b-(k-a))
else:
    print(0, 0)
a,b,k = map(int,input().split())

if a-k>0:
  a -= k
  print(a,b)
  exit()
else:
  k -= a
  a = 0
if b-k>0:
  b -=k
  print(a,b)
  exit()
else:
  print(a,0)
A, B, K = list(map(int,input().split()))

# A から Kを引く
A = A - K
# Aが負なら，その負の大きさの分だけBから引く
if A < 0:
    B = B + A
    A = 0
# Bが負なら0にする
if B < 0: B = 0

print(A,B)
nums = input().split(" ")
A = int(nums[0])
B = int(nums[1])
K = int(nums[2])

"""
ここで、まずはAとKの比較を行って、Aの方が大きければその場で試行は終了
し、Kの方が大きければ、A=0となり、その差|A-K|は残りのBから引くものになる。
"""
if A >= K:
  A -= K
  print(A, end=" ")
  print(B)
else:
  K -= A
  A = 0
  B -= K
  if B < 0:
    B = 0
  print(A, end=" ")
  print(B)
A,B,K = map(int,input().split())
if A<=K:
  K-=A
  A=0
  if B<=K:
    B=0
  else:
    B-=K
else:
  A-=K

print(A,B)
line = input()
a, b, k = line.split(" ")
a = int(a)
b = int(b)
k = int(k)

if k >= a+b:
    print(0,0)
else:
    if a - k < 0:
        print(0, b-(k-a))
    else:
        print(a - k, b)
a,b,k = map(int,input().split())

if a > k :
  print("{} {}".format(a-k,b))
elif a + b > k:
  print("{} {}".format(0,b+a-k))
elif k >= a+b:
  print("{} {}".format(0,0))
A,B,K = map(int,input().split())

if A-K >= 0:
    A -= K
elif B-(K-A)>=0:
    B -= (K-A)
    A = 0
else:
    A = 0
    B = 0

print('{} {}'.format(A,B))
a,b,k=map(int,input().split())
eat1=min(a,k)
k-=eat1
eat2=min(b,k)
print(a-eat1,b-eat2)
a, b, k = map(int, input().split())

if k > a + b:
    ans_a = 0
    ans_b = 0
elif a >= k:
    ans_a = a - k
    ans_b = b
else:
    ans_a = 0
    ans_b = b - (k - a)

print(ans_a, ans_b)
a,b,k=map(int,input().split())
print(a-k,b) if a>k else print(0,b-(k-a)) if a+b>k else print(0,0)
A, B, K = map(int, input().split())

if A >= K:
    A -= K
elif A + B >= K:
    B -= K - A
    A = 0
else:
    A = 0
    B = 0

print('{} {}' .format(A, B))
A,B,K = map(int,input().split())

A,K = A-K, K-A
if A < 0:
    A = 0  
elif K < 0:
    K = 0
    
B = B-K
if B < 0:
    B = 0
    
print(A,B)
A, B, T = map(int,input().split())

t = A - T
if t >= 0:
    print(t, B)
elif B+t >= 0:
    print(0, B+t)
else:
    print(0, 0)
A,B,K = map(int,input().split())

X = A-K
if(X >= 0):
  A=X
  print(A,B)
  
elif(X < 0 ):
  A=0
  if(B+X>=0):
    B=B+X
    print(A,B)
  elif(B+X<0):
    print(0,0)
import sys
a, b, k = map(int, sys.stdin.readline().split())
if a < k:
  if a + b - k >= 0:
    print(0, a + b - k)
  else:
    print(0, 0)
else:
  print(a - k, b)
a,b,k=map(int,input().split())

a = a - k

if a < 0:
    b = 0 if b+a <0 else  b+a
    a=0
print (a,b)
a, b, k = map(int,input().split())
if a + b < k:
    a = 0
    b = 0
elif a < k:
    b = b + a - k
    a = 0
else:
    a = a - k

print(a,b)
a,b,k=map(int,input().split())

if a>=0 and b>=0:
    leftover = a - k
    if(leftover>=0):
        print(leftover, b)
    elif(b+leftover >= 0):
        print(0, b+leftover)
    else:
        print(0, 0)
a, b, k = map(int, input().split(" "))

if k <= a:
  print(a-k, b)
elif k <= a + b:
  print(0, b + a - k)
else:
  print(0, 0)
A, B, K = map(int, input().split())

A_after = 0
B_after = 0

if A - K >= 0:
  A_after = A - K
  B_after = B

elif A + B - K >= 0:
  B_after = B - (K - A)
  
print(A_after, B_after)
import sys
input = sys.stdin.readline

a,b,k = (int(x) for x in input().split())

if a>k:
	print(a-k,b)
elif a+b>k:
	print(0,a+b-k)
else:
	print(0,0)
# ABC149
# B Greesy Takahashi
# takはA枚、aokiはB枚、TAKはK回
a, b, k = map(int, input().split())
if k > a:
    if k - a > b:
        print(0,0)
    else:
        print(0,b - (k - a))
else:
    print(a-k,b)
a,b,k=map(int,input().split())
if a>=k:
  print(a-k,b)
elif a-k<=0 and b-k+a>=0:
  print('0',b-k+a)
elif a-k<0 and b-k+a<0:
  print('0','0')