Problem: In Storia Kingdom, there is an artifact called "Perfect Sphere" made by a great meister Es. This is handed down for generations in the royal palace as a treasure. Es left a memo and filled mysterious values in it. Within achievements of researches, it has been revealed that the values denote coordinate values. However it is still unknown the definition of the coordinate system.

By the way, you are a person who lived in age of Es lived. The values which meister Es left are defined by following. Es set an moving object in the artifact sphere. Surprisingly, that is rigid body and perpetual organization. The object rotates inside the sphere and it is always touching the inside surface of the sphere. This value is a coordinate of the tangent point by the object and the sphere, but it is not a three dimensional value. The object is a plate and this is a simple polygon. Here, "simple" means "non self-intersected". This rotates while touching a great circle of the sphere. Here, assume that the great circle is a circle O centered in the origin in the xy plane. (It is two-dimensional Cartesian coordinate system, the direction of positive x-value is right and the direction of positive y-value is up). This plate touches the circle O with a single point at the beginning of the movement. And it rotates in counterclockwise as the current touching point is the rotation fulcrum. When another point X of the plate touches the circle O newly, the plate continue to rotate as described above, but in the next rotation, the rotation fulcrum point is changed. This will be the point X. If two or more points can be interpreted as the point X, the point X is a most distant point from the currently touching point X'. Here, that distance is the length of the arc of the circle O from the point X' to the point X in clockwise.

Es asked you, an excellent assistant, to write a program that enumerates Q tangent points (fulcrum points while the movement) by the plate and the circle O while the movement of the plate described above in the chronological order. Of course, one and the previous one must be distinct points. Following figures show you examples of the movement of the plate inside the circle O.
1
<image>
2
<image>
3
<image>
4
<image>

Constraints

The number of datasets is less than or equal to 400.
3≤N≤25
1≤R≤1000
0≤Q≤100

Input

Input consists of multiple datasets.
A dataset is given in a following format.


N R Q
x1 y1
x2 y2
...
xN yN


N, R, Q are integers that represent the number of points of the plate, the radius of the circle, and the number of points Es needs respectively.
Following N lines contain 2N integers that represent coordinates of the plate's points ( xk , yk ) in the circle.(1≤k≤N)


You can assume following conditions.
* Points of the plate are given in counterclockwise.
* No three points are co-linear.
* N-1 points of the plate are given inside of the circle (distances between the center of the circle and these points are less than R). And 1 point is on the circle edge.
N=R=Q=0 shows the end of input.

Output

For each dataset, output (Px Py:real number) in Q in the following format.


Px1 Px1
Px2 Py2
...
PxN+1 PyN+1


These answers must satisfy |Txi-Pxi|≤0.0001 and |Tyi-Pyi|≤0.0001.
Here, Pxi, Pyi(1≤i≤Q) are your output and Txi,Tyi(1≤i≤Q) are judge's output.

Example

Input

4 10 8
0 -10
3 -7
0 -4
-3 -7
0 0 0


Output

-4.146082488326 -9.100000000000
-7.545870128753 -6.562000000000
-9.587401146004 -2.842840000000
-9.903199956975 1.388031200000
-8.436422775690 5.369056784000
-5.451089494781 8.383652146880
-1.484560104812 9.889190123322
2.749190104024 9.614673877565

Solution (in CPP):

Solution:
#include<bits/stdc++.h>
using namespace std;
#define r(i,n) for(int i=0;i<n;i++)
typedef double D;
typedef complex<D> P;
typedef vector<P>VP;
const D EPS = 1e-9;
#define X real()
#define Y imag()
#define EQ(n,m) (abs(n-m)<EPS)
D dot(P a,P b){return (conj(a)*b).X;}
D cross(P a,P b){return (conj(a)*b).Y;}
int ccw(P a,P b,P c){
  b-=a;c-=a;
  if(cross(b,c)>EPS)return 1;
  if(cross(b,c)< -EPS)return -1;
  if(dot(b,c)< -EPS)return 2;
  if(norm(b)<norm(c))return -2;
}
VP crosspointCC(P a, D ar, P b, D br) {
  VP ps;
  P ab=b-a;
  D d=abs(ab);
  D crL=(norm(ab)+ar*ar-br*br)/(2*d);
  if(EQ(d,0)||ar<abs(crL))return ps;
  P abN=ab*P(0,sqrt(ar*ar-crL*crL)/d);
  P cp=a+crL/d*ab;
  ps.push_back(cp + abN);
  if(!EQ(norm(abN),0)) ps.push_back(cp-abN);
  return ps;
}
namespace std {
  bool operator<(const P a,const P b) {
    return a.X!=b.X?a.X<b.X:a.Y<b.Y;
  }
}
VP convexHull(VP ps){
  int n=ps.size(),k=0;
  sort(ps.begin(),ps.end());
  VP ch(2*n);
  for(int i=0;i<n;ch[k++]=ps[i++])
    while(k>=2&&ccw(ch[k-2],ch[k-1],ps[i])<=0)--k;
  for(int i=n-2,t=k+1;i>=0;ch[k++]=ps[i--])
    while(k>=t&&ccw(ch[k-2],ch[k-1],ps[i])<=0)--k;
  ch.resize(k-1);
  return ch;
}

P rot(P p, double a,double x,double y){
  a=a*M_PI/180.0;
  P p1=P(x,y);
  p-=p1;
  return P(p.X*cos(a)+p.Y*(-sin(a))+x,p.X*sin(a)+p.Y*cos(a)+y);
}

int n,q;
D r;

int main(){
  //cout<<acos(cos(M_PI))/M_PI*180<<endl;
  while(cin>>n>>r>>q,n){
  VP v;
  r(i,n){
    double x,y;
    cin>>x>>y;
    v.push_back(P(x,y));
  }
  v=convexHull(v);
  int p;
  double t=1e9;
  double y,x;
  r(i,v.size()){
    if(v[i].Y<t){
      x=v[i].X;
      y=v[i].Y;
      t=v[i].Y;
      p=i;
    }
  }
  //for(int i=p,c=0;c<4;i=(i+1)%4,c++){
  //cout<<v[i].X<<' '<<v[i].Y<<endl;
  //}
  r(i,q){//cout<<p<<endl;
    int ppp=p;
    for(;;p=(p-1+v.size())%v.size()){//cout<<p<<endl;
      VP p1=crosspointCC( P(0,0) ,r , P(x,y) , abs(v[ppp]-v[(p-1+v.size())%v.size()]) );
      P pt;
      if(ccw(p1[0],P(x,y),P(0,0))==1)pt=p1[0];
      else pt=p1[1];
      // r(k,2){
      //cout<<pt.X<<' '<<pt.Y<<endl;
      //cout<<v[(p-1+v.size())%v.size()].X<<' '<<v[(p-1+v.size())%v.size()].Y<<endl;
      //}//cou
      D a=abs(v[ppp]-v[(p-1+v.size())%v.size()]);
      // D b=abs(v[p]-v[(p+1)%v.size()]);
      D c=abs(v[(p-1+v.size())%v.size()]-pt)*abs(v[(p-1+v.size())%v.size()]-pt);

      //cout<<sqrt(c)<<endl;
      //return 0;
      
      double radi=acos((a*a+a*a-c)/(2*a*a));

      // cout<<a<<endl;
      
      radi=radi/M_PI*180;
      //cout<<radi<<endl;
      
      VP vt=v;

      r(k,vt.size()){
	vt[k]=rot(vt[k],radi,x,y);
      }
      
      int flag=0;
      r(k,vt.size()){
	if(abs(vt[k]-P(0,0))-EPS>r)flag++;
      }
      if(flag)continue;
      v=vt;
      y=v[(p-1+v.size())%v.size()].Y;
      x=v[(p-1+v.size())%v.size()].X;
      printf("%.12f %.12f\n",x,y);
      p=(p-1+v.size())%v.size();
      break;
    }
  }
}
}