Python 2, 340 - 8 = 332
s,o=raw_input(),''
for z in s:
if z in'Hh':o+='Hello World!'
elif z in'Qq':o+=s
elif'9'==z:
i=298
while~-i:print i/3or 99,'bottle'+'s of beer on the wall.\n'[2<i<6:9+i%3*12]+'..\nGToa kteo otnhee dsotwonr,e ,p absusy isto maer omuonrde,,'[(i>3)+i%3*68::2];i-=1
elif'+'!=z:o='Source code contains invalid characters';break
print o
s,o=raw_input(),''
for z in s:
if z in'Hh':o+='Hello World!'
elif z in'Qq':o+=s
elif'9'==z:
i=298
while~-i:print i/3or 99,'bottle'+'s of beer on the wall.\n'[2<i<6:9+i%3*12]+'..\nGToa kteo otnhee dsotwonr,e ,p absusy isto maer omuonrde,,'[(i>3)+i%3*68::2];i-=1
elif'+'!=z:o='Source code contains invalid characters';break
print o