import java.util.Scanner

object Main {

  val sc = new Scanner(System.in)
  def main(args: Array[String]): Unit = {
    val a = sc.nextInt
    val b = sc.nextInt
    val k = sc.nextInt

    val d = gcd(a,b)
    val res = (1 to d).filter(d % _ == 0).reverse(k - 1)

    println(res)
  }
  def gcd(a: Int, b: Int): Int = {
    if(b == 0) a
    else {
      if(a < b) gcd(b, a)
      else gcd(b, a%b)
    }
  }
}