#!/usr/bin/ruby
classArraydefto_sentencereturn first.to_s if size <2"#{self[0..-2].join(', ')} and #{last}"endend
days =%w[first second third fourth fifth sixth seventh eighth ninth tenth eleventh twelveth]
objects =["A Partridge in a Pear Tree","Two Turtle Doves","Thee French Hens","Four Calling Birds","Five Golden Rings","Size Geese A-laying","Seven Swans A-swimming","Eight Maids A-milking","Nine Ladies Dancing","Ten Lords A-leaping","Eleven Pipers Piping","Twelve Drummers Drumming"]12.times do |i|
puts "On the #{days[i]} day of Christmas my true love gave to me #{objects[0..i].reverse.to_sentence}"end