//    Sample java program to implement VAL arc program.

//    It reads three values from the file "input.txt"

//    1. a radius
//    2. an angle
//    3. an integer

//    and outputs a VAL program that will move the robot in a circular
//    arc that encompasses the angle inputted.  The circle is actually
//    approximated by straight line segments, and the last input, the
//    integer, is how many line segments should be used to approximate
//    the circle.

import java.io.*;

public class Arc {
    public static void main(String argv[])  throws IOException {
	double r,theta,x,y,z,o,a,t,ang,dx,dy;
	int count,i;
	x = 100.0;
	y = 250.0;
	z = -175.0;
	o = 179.0;
	a = 1.0;
	t = 89.0;


	FileReader in = new FileReader("input.txt");
	BufferedReader myInput = new BufferedReader(in);
	FileWriter out = new FileWriter("program.txt");
	PrintWriter myOutput = new PrintWriter(out);
	
	r = Float.valueOf(myInput.readLine()).floatValue();
	theta = Float.valueOf(myInput.readLine()).floatValue()*3.1415926/180.0;
	count = Integer.valueOf(myInput.readLine()).intValue();

	i = 1;
	for(ang=0;ang<=theta;ang+=theta/count) {
	  x -= (r*theta/count*Math.cos(ang));
	  y += (r*theta/count*Math.sin(ang));
	  myOutput.println("DP P" + i + " " + x + " " + y + " " + z + " " + o + " " + a + " " + t);
	  i++;
	}

	myOutput.println("DP P1 100 250 -175 179 1 89");
	myOutput.println("SPEED 10 ALWAYS");
	myOutput.println("MOVE P1");

	for(ang=0;ang<=theta;ang+=theta/count) {
	    dx = (-r*theta/count*Math.cos(ang));
	    dy = (r*theta/count*Math.sin(ang));
	    if(dx < 0.01 && dx > -0.01) {
		dx = 0.0;
	    }

	    if(dy < 0.01 && dy > -0.01) {
		dy = 0.0;
	    }
	  myOutput.println("DRAW " + dx + ", " + dy);
	}

	i = 1;
	for(ang=0;ang<=theta;ang+=theta/count) {
	  myOutput.println("MOVE P" + i);
	  i++;
	}

	myOutput.println("READY");
	in.close();
	out.close();
    }
}
