#!/usr/bin/perl -w

my %opt;
sub opt() {
    my $k;
    my $v;

    for my $opt (@ARGV) {
	($k,$v) = split(/=/, $opt, 2);
	$opt{$k} = $v;
    }
}


sub main() {
    opt();

    my $x = $opt{x};
    my $y = $opt{y};
    my $L = $opt{L};
    my $n = $opt{n};
    #my $R = $opt{R};
    my $r = $opt{r};

    my $R = ( $L + 2*($n - 1)*$r) / (2*$n);

    for (my $ix = 1; $ix <= $n; $ix++) {
	my $xx = $x + (2*$ix-1) * $R - 2*($ix-1)*$r;
	print "A $xx $y $R 0 180 3 0 2 0 -1 -1\n";
    }

    for (my $ix = 1; $ix <= $n-1; $ix++) {
	my $xx = $x + 2*$ix * $R - (2*$ix-1)*$r;
	print "A $xx $y $r 180 180 3 0 2 0 -1 -1\n";
    }
}

main();
