s1="On the %s day of Christmas,\nmy true love sent to me\n" s="""Twelve drummers drumming, Eleven pipers piping, Ten lords a-leaping, Nine ladies dancing, Eight maids a-milking, Seven swans a-swimming, Six geese a-laying, Five golden rings, Four calling birds, Three French hens, Two turtle doves, A%s partridge in a pear tree%s\n\n""".splitlines() for i in range(12):print s1%(('first','second','third','four','fif','six','seven','eigh','nin','ten','eleven','twelf')[i]+("","th")[i>2]),"\n".join(s[11-i:])%(("nd a","")[not i],(".","!")[i==11])