Buggy python submission (verdict: Runtime Error):
A, B, K = (int(i) for i in input().split())
list = []

if A > B:
  judge = A
else:
  judge = B
for i in range(judge):
  if i != 0:
    if A % i == 0 and B % i == 0:
      list.append(i)
print(list[len(list)-K])


Fixed submission:
A, B, K = (int(i) for i in input().split())
list = []
 
for i in range(101):
  if i != 0:
    if A % i == 0 and B % i == 0:
      list.append(i)
print(list[len(list)-K])

Buggy python submission (verdict: Runtime Error):
try:
  A, B, K = (int(i) for i in input().split())
  list = []
  for i in range(1, 100):
    if A % == 0 and B % i == 0:
      list.append(i)
  print(list[len(list)-K])
  
except ZeroDivisionError:
    print("ZeroDivisionError!!")
    

Fixed submission:
A, B, K = (int(i) for i in input().split())
list = []
 
for i in range(101):
  if i != 0:
    if A % i == 0 and B % i == 0:
      list.append(i)
print(list[len(list)-K])

Buggy python submission (verdict: Runtime Error):
A, B, K = (int(i) for i in input().split())
list = []
for i in range(1, 101):
  if A % == 0 and B % i == 0:
    list.append(i)
print(list[len(list)-K])


Fixed submission:
A, B, K = (int(i) for i in input().split())
list = []
 
for i in range(101):
  if i != 0:
    if A % i == 0 and B % i == 0:
      list.append(i)
print(list[len(list)-K])

Buggy python submission (verdict: Runtime Error):
A, B, K = (int(i) for i in input().split())
list = []
for i in range(101):
  if i != 0:
    if i % A == 0 and i % B == 0:
      list.append(i)
print(list[len(list)-K])


Fixed submission:
A, B, K = (int(i) for i in input().split())
list = []
 
for i in range(101):
  if i != 0:
    if A % i == 0 and B % i == 0:
      list.append(i)
print(list[len(list)-K])

Buggy python submission (verdict: Runtime Error):
A, B, K = (int(i) for i in input().split())
list = []


for i in range(1, 100):
  if i % A == 0 and i % B == 0:
    list.append(i)
a = len(list)-K
print(list[a])


Fixed submission:
A, B, K = (int(i) for i in input().split())
list = []
 
for i in range(101):
  if i != 0:
    if A % i == 0 and B % i == 0:
      list.append(i)
print(list[len(list)-K])

Buggy python submission (verdict: Runtime Error):
A, B, K = (int(i) for i in input().split())
list = []


for i in range(101):
  if i != 0:
    if i % A == 0 and i % B == 0:
      list.append(i)
print(list[len(list)-K])


Fixed submission:
A, B, K = (int(i) for i in input().split())
list = []
 
for i in range(101):
  if i != 0:
    if A % i == 0 and B % i == 0:
      list.append(i)
print(list[len(list)-K])

Buggy python submission (verdict: Runtime Error):
A, B, K = (int(i) for i in input().split())
list = []


for i in range(1, 100):
  if i % A == 0 and i % B == 0:
    list.append(i)
print(list[len(list)-K])


Fixed submission:
A, B, K = (int(i) for i in input().split())
list = []
 
for i in range(101):
  if i != 0:
    if A % i == 0 and B % i == 0:
      list.append(i)
print(list[len(list)-K])

Buggy python submission (verdict: Runtime Error):
A, B, K = (int(i) for i in input().split())
list = []

for i in range(1, 100):
  if i % A == 0 and i % B == 0:
    list.append(i)
print(list[K-1])


Fixed submission:
A, B, K = (int(i) for i in input().split())
list = []
 
for i in range(101):
  if i != 0:
    if A % i == 0 and B % i == 0:
      list.append(i)
print(list[len(list)-K])