#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;

int n,r,q,r2;
P p[30];
int cur;
D min_s[30],SIN[30],COS[30],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 real(conj(b-a)*(c-a))/(abs(b-a)*abs(c-a));}

inline D rot_seta(const int &end){
  D seta = acos( 1 - norm(p[end]-p[cur])/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){
      scanf("%lf%lf",&x,&y);
      p[i] = P(x,y);
      if(abs(abs(p[i])-r)<EPS)cur = i;
    }
    
    vector<int> nxt(n,-1);
    bool f = false;

    rep(i,q){
      if(nxt[cur]>=0)f = true;

      if(!f){
	min_s[cur] = 5;
	rep(j,n){
	  if(cur==j)continue;
	  D s = rot_seta(j);
	  if(nxt[cur]<0 || s > min_s[cur]+EPS)nxt[cur] = j, min_s[cur] = s;
	}
	min_s[cur] = acos(min_s[cur]);
	SIN[cur] = sin(min_s[cur]); COS[cur] = cos(min_s[cur]);
      }

      rep(j,n){
	if((f&&nxt[j]<0) || j==cur)continue;
	x = p[j].real()-p[cur].real(); y = p[j].imag()-p[cur].imag();
	p[j] = P(x*COS[cur] - y*SIN[cur], x*SIN[cur] + y*COS[cur]) + p[cur];
      }
      printf("%.9lf %.9lf\n",p[nxt[cur]].real(), p[nxt[cur]].imag());

      if(!i){
	int tmp = nxt[cur];
	nxt[cur] = -1;
	cur = tmp;
      }else{
	cur = nxt[cur];
      }
    }
  }
}