uses wincrt;

const
  gifts: array[1..12] of string = (
      'Partridge in a Pear Tree',
      'Turtle Doves',
      'French Hens',
      'Calling Birds',
      'Golden Rings',
      'Geese A-laying',
      'Swans A-swimming',
      'Maids A-milking',
      'Ladies Dancing',
      'Lords A-leaping',
      'Pipers Piping',
      'Drummers Drumming');

function max(x,y:integer):integer;
  begin
    if x>y then max := x else max := y;
  end;

var day,i:integer;
begin
  write('What day?   ');
  readln(day);
  for i := 1 to 12 do
    writeln(max(i*(day-i+1),0):4,' ',gifts[i]);
end.