#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)n;i++)
using namespace std;
typedef double D;
typedef complex<D> P;
const D EPS = 1e-8;
const D PI = acos(-1);

int n,r,q,r2;
P p[30];
int cur;

inline D dot(const P &x, const P &y){return real(conj(x)*y);}

inline P rotate(const P &v, const D &s){
  return P(real(v)*cos(s) - imag(v)*sin(s), real(v)*sin(s) + imag(v)*cos(s) );
}

inline D arg(const P &a,const P &b,const P &c){return acos(dot(b-a,c-a)/(abs(b-a)*abs(c-a)));}

inline D rot_seta(const int &end){
  D dis = norm(p[end]-p[cur]);
  D seta = acos( (r2 - dis)/(r2) );
  P nxt = rotate(p[cur],-seta);
  return arg(p[cur],p[end],nxt);
}

int main(){
  while(scanf("%d%d%d",&n,&r,&q), n){
    r2 = 2*r*r;
    rep(i,n){
      D x,y;
      scanf("%lf%lf",&x,&y);
      p[i] = P(x,y);
      if(abs(abs(p[i])-r)<EPS)cur = i;
    }
    
    vector<int> nxt(n,-1);
    
    rep(i,q){
      int id = -1;
      D min_s = PI;
      if(nxt[cur]>=0)id = nxt[cur];
      else{
	rep(j,n){
	  if(cur==j)continue;
	  D s = rot_seta(j);
	  if(id<0 || s+EPS < min_s)id = j, min_s = s;
	}
	nxt[cur] = id;
      }

      D seta = rot_seta(id);
      rep(i,n){
	if(i==cur)continue;
	p[i] = rotate(p[i]-p[cur],seta) + p[cur];
      }
      printf("%.9lf %.9lf\n",p[id].real(), p[id].imag());
      cur = id;
    }
  }
}