output_description: Print the K-th largest positive integer that divides both A and B.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      A B K
attempt: line = input()
  a, b, c = [int(n) for n in line.split()]
  if a > b:
      maior = a
      menor = b
  else:
      maior = b
      menor = a
  v = []
  for i in range(1, menor + 1, 1):
      if menor % i == 0 and maior % i == 0:
          v.append(i)
  print(v[-c])
  
problem_description: Statement
  
  You are given positive integers A and B.
  
  Find the K-th largest positive integer that divides both A and B.
  
  The input guarantees that there exists such a number.
samples: [{"input": "8 12 2", "output": "2\n    \n\nThree positive integers divides both 8 and 12: 1, 2 and 4. Among them, the\nsecond largest is 2.\n\n* * *"}, {"input": "100 50 4", "output": "5\n    \n\n* * *"}, {"input": "1 1 1", "output": "1"}]