n=99
while n:
 for c in 1,0:N=(([99]+range(1,n))[-1],n)[c];x=('%d bottles'%N)[:7+N]+' of beer on the wall';print(('Go to the store and buy some more, ','Take one down and pass it around, ')[n>1]+x+('.','.\n')[n>1],x+', '+x[:-12]+'.')[c]
 n-=1
