### constant

DELTA = 1.0e-14

### subroutines

def on_circle(r2, pol)
  min_d2 = Float::INFINITY
  min_i = nil

  pol.each_with_index do |pt, i|
    d2 = r2 - (pt[0] ** 2 + pt[1] ** 2)
    if min_d2 > d2
      min_d2 = d2
      min_i = i
    end
  end

  min_i
end

def rot_pt(pvx, pvy, x, y, th)
  c = Math.cos(th)
  s = Math.sin(th)
  x -= pvx
  y -= pvy
  [c * x - s * y + pvx, s * x + c * y + pvy]
end

### main

loop do
  n, r, q = gets.split.map(&:to_i)
  break if (n | r | q) == 0

  r2 = r * r

  pol = n.times.map{gets.split.map(&:to_f)}

  pvi = on_circle(r2, pol)

  q.times do
    #p pvi
    #puts "[" + pol.map{|pt| sprintf("[%.2f, %.2f]", *pt)}.join(', ') + "],"

    pvx, pvy = pol[pvi]
    pvth = Math.atan2(-pvy, -pvx) + Math::PI / 2

    min_th = Float::INFINITY
    min_i = nil

    for k in (1...n)
      i = (pvi + n - k) % n
      xi, yi = pol[i]
      thi = Math.atan2(yi - pvy, xi - pvx)

      th0 = 0.0
      th1 = pvth - thi
      th1 += Math::PI * 2 if th1 < 0.0
      #p [k, th0, th1]

      while th1 - th0 > DELTA
        #p [k, th0, th1]
        th = (th0 + th1) / 2
        x, y = rot_pt(pvx, pvy, xi, yi, th)
        pr2 = x * x + y * y

        if pr2 == r2
          th0 = th1 = th
        elsif pr2 > r2
          th1 = th
        else
          th0 = th
        end
      end

      th = (th0 + th1) / 2
      #p [i, dth]

      if min_th > th
        min_th = th
        min_i = i
      end
    end
    #p [min_i, min_th]

    for k in (1...n)
      i = (pvi + n - k) % n
      pol[i] = rot_pt(pvx, pvy, *pol[i], min_th)
    end

    pvi = min_i
    puts pol[pvi].join(' ')
  end
end