Buggy python submission (verdict: Runtime Error):
A, B, K = input().split()

A = int(A)
B = int(B)
K = int(K)

for i in range(K):
	if i % 2 == 0:
		B += A / 2
		A /= 2
	else:
		A += B / 2
		B /= 2
print(A + " " + B)


Fixed submission:
A, B, K = input().split()

A = int(A)
B = int(B)
K = int(K)

for i in range(K):
	if i % 2 == 0:
		A //= 2
		B += A 
	else:
		B //= 2
		A += B 
print(str(A) + " " + str(B))

Buggy python submission (verdict: Runtime Error):
A, B, K = input().split()

A = int(A)
B = int(B)
K = int(K)

for i in range(K):
	if i % 2 == 0:
		B += A /2
		A /= 2
	else:
		A += B / 2
		B /= 2
print(A + " " + B)


Fixed submission:
A, B, K = input().split()

A = int(A)
B = int(B)
K = int(K)

for i in range(K):
	if i % 2 == 0:
		A //= 2
		B += A 
	else:
		B //= 2
		A += B 
print(str(A) + " " + str(B))

Buggy python submission (verdict: Runtime Error):
A, B, K = input().split()

A = int(A)
B = int(B)
K = int(K)

for i in K:
	if i % 2 == 0:
		B += A /2
		A /= 2
	else:
		A += B / 2
		B /= 2
print(A + " " + B)

Fixed submission:
A, B, K = input().split()

A = int(A)
B = int(B)
K = int(K)

for i in range(K):
	if i % 2 == 0:
		A //= 2
		B += A 
	else:
		B //= 2
		A += B 
print(str(A) + " " + str(B))

Buggy python submission (verdict: Runtime Error):
A, B, K = input().split()

A = int(A)
B = int(B)
K = int(K)

for i = 0; i < K; i++:
	if i % 2 == 0:
		B += A /2
		A /= 2
	else:
		A += B / 2
		B /= 2
print(A + " " + B)


Fixed submission:
A, B, K = input().split()

A = int(A)
B = int(B)
K = int(K)

for i in range(K):
	if i % 2 == 0:
		A //= 2
		B += A 
	else:
		B //= 2
		A += B 
print(str(A) + " " + str(B))

Buggy python submission (verdict: Runtime Error):
A, B, K = input().split()

A = int(A)
B = int(B)
K = int(K)

while K >= 1 && A >= 1 && B >= 1:
	if A % 2 == 0:
		B += A / 2
		A = A / 2
	else:
		A -= 1
		B += A / 2
		A = A / 2
	if B % 2 == 0:
		A += B / 2
		B = B /2
	else:
		B -= 1
		A += B / 2
		B = B /2		
	K -= 1
print(A + " " + B)


Fixed submission:
A, B, K = input().split()

A = int(A)
B = int(B)
K = int(K)

for i in range(K):
	if i % 2 == 0:
		A //= 2
		B += A 
	else:
		B //= 2
		A += B 
print(str(A) + " " + str(B))

Buggy python submission (verdict: Runtime Error):
A, B, K = input().split()

A = int(A)
B = int(B)
K = int(K)

while K >= 1:
	if A % 2 == 0:
		B += A / 2
		A = A / 2
	else:
		A -= 1
		B += A / 2
		A = A / 2
	if B % 2 == 0:
		A += B / 2
		B = B /2
	else:
		B -= 1
		A += B / 2
		B = B /2		
	K -= 1
print(A + " " + B)

Fixed submission:
A, B, K = input().split()

A = int(A)
B = int(B)
K = int(K)

for i in range(K):
	if i % 2 == 0:
		A //= 2
		B += A 
	else:
		B //= 2
		A += B 
print(str(A) + " " + str(B))

Buggy python submission (verdict: Runtime Error):
A, B, K = input().split()

while K >= 1:
	if A % 2 == 0:
		B += A / 2
		A = A / 2
	else:
		A -= 1
		B += A / 2
		A = A / 2
	if B % 2 == 0:
		A += B / 2
		B = B /2
	else:
		B -= 1
		A += B / 2
		B = B /2		
	K -= 1
print(A + " " + B)


Fixed submission:
A, B, K = input().split()

A = int(A)
B = int(B)
K = int(K)

for i in range(K):
	if i % 2 == 0:
		A //= 2
		B += A 
	else:
		B //= 2
		A += B 
print(str(A) + " " + str(B))

Buggy python submission (verdict: Runtime Error):
data = input().split()

 A = int(data[0])
 B = int(data[1])
 K = int(data[2])

while K >= 1:
	if A % 2 == 0:
		B += A / 2
	else:
		A -= 1
		B += A / 2	
	K--
print(A + " " + B)


Fixed submission:
A, B, K = input().split()

A = int(A)
B = int(B)
K = int(K)

for i in range(K):
	if i % 2 == 0:
		A //= 2
		B += A 
	else:
		B //= 2
		A += B 
print(str(A) + " " + str(B))