n=99
B=", %d %s of beer.\n"
x=lambda n:(n,'bottles'[:5+n])
l=[n]*2+range(1,n+1)
o=B[2:-2]+" on the wall"
s="Go to the store and buy some more, %s."%o,"Take one down and pass it around, %s.\n"%o,o+B
while n:print(s[2]+s[n>1])%(x(n)*2+x(l[n]));n-=1
