You task is to implement an simple interpreter for the notorious esoteric language [HQ9+](https://esolangs.org/wiki/HQ9+) that will work for a single character input:

- If the input is `'H'`, return `'Hello World!'`
- If the input is `'Q'`, return the input
- If the input is `'9'`, return the full lyrics of [99 Bottles of Beer](http://www.99-bottles-of-beer.net/lyrics.html). It should be formatted like this:

```if:rust
__Note__: In Rust, return `Some` containing the appropriate value.
```

```
99 bottles of beer on the wall, 99 bottles of beer.
Take one down and pass it around, 98 bottles of beer on the wall.
98 bottles of beer on the wall, 98 bottles of beer.
Take one down and pass it around, 97 bottles of beer on the wall.
97 bottles of beer on the wall, 97 bottles of beer.
Take one down and pass it around, 96 bottles of beer on the wall.
...
...
...
2 bottles of beer on the wall, 2 bottles of beer.
Take one down and pass it around, 1 bottle of beer on the wall.
1 bottle of beer on the wall, 1 bottle of beer.
Take one down and pass it around, no more bottles of beer on the wall.
No more bottles of beer on the wall, no more bottles of beer.
Go to the store and buy some more, 99 bottles of beer on the wall.
```

- For everything else, don't return anything (return `null` in C#, `None` in Rust).

(`+` has no visible effects so we can safely ignore it.)

Difficulty: EASY
Starter code: def HQ9(code):
	

Solutions:
LINES = '{0} of beer on the wall, {0} of beer.\nTake one down and pass it around, {1} of beer on the wall.'
SONG = '\n'.join((LINES.format('{} bottles'.format(n), '{} bottle'.format(n - 1) + 's' * (n != 2)) for n in range(99, 1, -1)))
SONG += '\n1 bottle of beer on the wall, 1 bottle of beer.\nTake one down and pass it around, no more bottles of beer on the wall.\nNo more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.'

def HQ9(code):
	return {'H': 'Hello World!', 'Q': 'Q', '9': SONG}.get(code, None)


def HQ9(c):
	return 'Hello World!' if c == 'H' else c if c == 'Q' else song() if c == '9' else None

def song():
	return '99 bottles of beer on the wall, 99 bottles of beer.\nTake one down and pass it around, 98 bottles of beer on the wall.\n98 bottles of beer on the wall, 98 bottles of beer.\nTake one down and pass it around, 97 bottles of beer on the wall.\n97 bottles of beer on the wall, 97 bottles of beer.\nTake one down and pass it around, 96 bottles of beer on the wall.\n96 bottles of beer on the wall, 96 bottles of beer.\nTake one down and pass it around, 95 bottles of beer on the wall.\n95 bottles of beer on the wall, 95 bottles of beer.\nTake one down and pass it around, 94 bottles of beer on the wall.\n94 bottles of beer on the wall, 94 bottles of beer.\nTake one down and pass it around, 93 bottles of beer on the wall.\n93 bottles of beer on the wall, 93 bottles of beer.\nTake one down and pass it around, 92 bottles of beer on the wall.\n92 bottles of beer on the wall, 92 bottles of beer.\nTake one down and pass it around, 91 bottles of beer on the wall.\n91 bottles of beer on the wall, 91 bottles of beer.\nTake one down and pass it around, 90 bottles of beer on the wall.\n90 bottles of beer on the wall, 90 bottles of beer.\nTake one down and pass it around, 89 bottles of beer on the wall.\n89 bottles of beer on the wall, 89 bottles of beer.\nTake one down and pass it around, 88 bottles of beer on the wall.\n88 bottles of beer on the wall, 88 bottles of beer.\nTake one down and pass it around, 87 bottles of beer on the wall.\n87 bottles of beer on the wall, 87 bottles of beer.\nTake one down and pass it around, 86 bottles of beer on the wall.\n86 bottles of beer on the wall, 86 bottles of beer.\nTake one down and pass it around, 85 bottles of beer on the wall.\n85 bottles of beer on the wall, 85 bottles of beer.\nTake one down and pass it around, 84 bottles of beer on the wall.\n84 bottles of beer on the wall, 84 bottles of beer.\nTake one down and pass it around, 83 bottles of beer on the wall.\n83 bottles of beer on the wall, 83 bottles of beer.\nTake one down and pass it around, 82 bottles of beer on the wall.\n82 bottles of beer on the wall, 82 bottles of beer.\nTake one down and pass it around, 81 bottles of beer on the wall.\n81 bottles of beer on the wall, 81 bottles of beer.\nTake one down and pass it around, 80 bottles of beer on the wall.\n80 bottles of beer on the wall, 80 bottles of beer.\nTake one down and pass it around, 79 bottles of beer on the wall.\n79 bottles of beer on the wall, 79 bottles of beer.\nTake one down and pass it around, 78 bottles of beer on the wall.\n78 bottles of beer on the wall, 78 bottles of beer.\nTake one down and pass it around, 77 bottles of beer on the wall.\n77 bottles of beer on the wall, 77 bottles of beer.\nTake one down and pass it around, 76 bottles of beer on the wall.\n76 bottles of beer on the wall, 76 bottles of beer.\nTake one down and pass it around, 75 bottles of beer on the wall.\n75 bottles of beer on the wall, 75 bottles of beer.\nTake one down and pass it around, 74 bottles of beer on the wall.\n74 bottles of beer on the wall, 74 bottles of beer.\nTake one down and pass it around, 73 bottles of beer on the wall.\n73 bottles of beer on the wall, 73 bottles of beer.\nTake one down and pass it around, 72 bottles of beer on the wall.\n72 bottles of beer on the wall, 72 bottles of beer.\nTake one down and pass it around, 71 bottles of beer on the wall.\n71 bottles of beer on the wall, 71 bottles of beer.\nTake one down and pass it around, 70 bottles of beer on the wall.\n70 bottles of beer on the wall, 70 bottles of beer.\nTake one down and pass it around, 69 bottles of beer on the wall.\n69 bottles of beer on the wall, 69 bottles of beer.\nTake one down and pass it around, 68 bottles of beer on the wall.\n68 bottles of beer on the wall, 68 bottles of beer.\nTake one down and pass it around, 67 bottles of beer on the wall.\n67 bottles of beer on the wall, 67 bottles of beer.\nTake one down and pass it around, 66 bottles of beer on the wall.\n66 bottles of beer on the wall, 66 bottles of beer.\nTake one down and pass it around, 65 bottles of beer on the wall.\n65 bottles of beer on the wall, 65 bottles of beer.\nTake one down and pass it around, 64 bottles of beer on the wall.\n64 bottles of beer on the wall, 64 bottles of beer.\nTake one down and pass it around, 63 bottles of beer on the wall.\n63 bottles of beer on the wall, 63 bottles of beer.\nTake one down and pass it around, 62 bottles of beer on the wall.\n62 bottles of beer on the wall, 62 bottles of beer.\nTake one down and pass it around, 61 bottles of beer on the wall.\n61 bottles of beer on the wall, 61 bottles of beer.\nTake one down and pass it around, 60 bottles of beer on the wall.\n60 bottles of beer on the wall, 60 bottles of beer.\nTake one down and pass it around, 59 bottles of beer on the wall.\n59 bottles of beer on the wall, 59 bottles of beer.\nTake one down and pass it around, 58 bottles of beer on the wall.\n58 bottles of beer on the wall, 58 bottles of beer.\nTake one down and pass it around, 57 bottles of beer on the wall.\n57 bottles of beer on the wall, 57 bottles of beer.\nTake one down and pass it around, 56 bottles of beer on the wall.\n56 bottles of beer on the wall, 56 bottles of beer.\nTake one down and pass it around, 55 bottles of beer on the wall.\n55 bottles of beer on the wall, 55 bottles of beer.\nTake one down and pass it around, 54 bottles of beer on the wall.\n54 bottles of beer on the wall, 54 bottles of beer.\nTake one down and pass it around, 53 bottles of beer on the wall.\n53 bottles of beer on the wall, 53 bottles of beer.\nTake one down and pass it around, 52 bottles of beer on the wall.\n52 bottles of beer on the wall, 52 bottles of beer.\nTake one down and pass it around, 51 bottles of beer on the wall.\n51 bottles of beer on the wall, 51 bottles of beer.\nTake one down and pass it around, 50 bottles of beer on the wall.\n50 bottles of beer on the wall, 50 bottles of beer.\nTake one down and pass it around, 49 bottles of beer on the wall.\n49 bottles of beer on the wall, 49 bottles of beer.\nTake one down and pass it around, 48 bottles of beer on the wall.\n48 bottles of beer on the wall, 48 bottles of beer.\nTake one down and pass it around, 47 bottles of beer on the wall.\n47 bottles of beer on the wall, 47 bottles of beer.\nTake one down and pass it around, 46 bottles of beer on the wall.\n46 bottles of beer on the wall, 46 bottles of beer.\nTake one down and pass it around, 45 bottles of beer on the wall.\n45 bottles of beer on the wall, 45 bottles of beer.\nTake one down and pass it around, 44 bottles of beer on the wall.\n44 bottles of beer on the wall, 44 bottles of beer.\nTake one down and pass it around, 43 bottles of beer on the wall.\n43 bottles of beer on the wall, 43 bottles of beer.\nTake one down and pass it around, 42 bottles of beer on the wall.\n42 bottles of beer on the wall, 42 bottles of beer.\nTake one down and pass it around, 41 bottles of beer on the wall.\n41 bottles of beer on the wall, 41 bottles of beer.\nTake one down and pass it around, 40 bottles of beer on the wall.\n40 bottles of beer on the wall, 40 bottles of beer.\nTake one down and pass it around, 39 bottles of beer on the wall.\n39 bottles of beer on the wall, 39 bottles of beer.\nTake one down and pass it around, 38 bottles of beer on the wall.\n38 bottles of beer on the wall, 38 bottles of beer.\nTake one down and pass it around, 37 bottles of beer on the wall.\n37 bottles of beer on the wall, 37 bottles of beer.\nTake one down and pass it around, 36 bottles of beer on the wall.\n36 bottles of beer on the wall, 36 bottles of beer.\nTake one down and pass it around, 35 bottles of beer on the wall.\n35 bottles of beer on the wall, 35 bottles of beer.\nTake one down and pass it around, 34 bottles of beer on the wall.\n34 bottles of beer on the wall, 34 bottles of beer.\nTake one down and pass it around, 33 bottles of beer on the wall.\n33 bottles of beer on the wall, 33 bottles of beer.\nTake one down and pass it around, 32 bottles of beer on the wall.\n32 bottles of beer on the wall, 32 bottles of beer.\nTake one down and pass it around, 31 bottles of beer on the wall.\n31 bottles of beer on the wall, 31 bottles of beer.\nTake one down and pass it around, 30 bottles of beer on the wall.\n30 bottles of beer on the wall, 30 bottles of beer.\nTake one down and pass it around, 29 bottles of beer on the wall.\n29 bottles of beer on the wall, 29 bottles of beer.\nTake one down and pass it around, 28 bottles of beer on the wall.\n28 bottles of beer on the wall, 28 bottles of beer.\nTake one down and pass it around, 27 bottles of beer on the wall.\n27 bottles of beer on the wall, 27 bottles of beer.\nTake one down and pass it around, 26 bottles of beer on the wall.\n26 bottles of beer on the wall, 26 bottles of beer.\nTake one down and pass it around, 25 bottles of beer on the wall.\n25 bottles of beer on the wall, 25 bottles of beer.\nTake one down and pass it around, 24 bottles of beer on the wall.\n24 bottles of beer on the wall, 24 bottles of beer.\nTake one down and pass it around, 23 bottles of beer on the wall.\n23 bottles of beer on the wall, 23 bottles of beer.\nTake one down and pass it around, 22 bottles of beer on the wall.\n22 bottles of beer on the wall, 22 bottles of beer.\nTake one down and pass it around, 21 bottles of beer on the wall.\n21 bottles of beer on the wall, 21 bottles of beer.\nTake one down and pass it around, 20 bottles of beer on the wall.\n20 bottles of beer on the wall, 20 bottles of beer.\nTake one down and pass it around, 19 bottles of beer on the wall.\n19 bottles of beer on the wall, 19 bottles of beer.\nTake one down and pass it around, 18 bottles of beer on the wall.\n18 bottles of beer on the wall, 18 bottles of beer.\nTake one down and pass it around, 17 bottles of beer on the wall.\n17 bottles of beer on the wall, 17 bottles of beer.\nTake one down and pass it around, 16 bottles of beer on the wall.\n16 bottles of beer on the wall, 16 bottles of beer.\nTake one down and pass it around, 15 bottles of beer on the wall.\n15 bottles of beer on the wall, 15 bottles of beer.\nTake one down and pass it around, 14 bottles of beer on the wall.\n14 bottles of beer on the wall, 14 bottles of beer.\nTake one down and pass it around, 13 bottles of beer on the wall.\n13 bottles of beer on the wall, 13 bottles of beer.\nTake one down and pass it around, 12 bottles of beer on the wall.\n12 bottles of beer on the wall, 12 bottles of beer.\nTake one down and pass it around, 11 bottles of beer on the wall.\n11 bottles of beer on the wall, 11 bottles of beer.\nTake one down and pass it around, 10 bottles of beer on the wall.\n10 bottles of beer on the wall, 10 bottles of beer.\nTake one down and pass it around, 9 bottles of beer on the wall.\n9 bottles of beer on the wall, 9 bottles of beer.\nTake one down and pass it around, 8 bottles of beer on the wall.\n8 bottles of beer on the wall, 8 bottles of beer.\nTake one down and pass it around, 7 bottles of beer on the wall.\n7 bottles of beer on the wall, 7 bottles of beer.\nTake one down and pass it around, 6 bottles of beer on the wall.\n6 bottles of beer on the wall, 6 bottles of beer.\nTake one down and pass it around, 5 bottles of beer on the wall.\n5 bottles of beer on the wall, 5 bottles of beer.\nTake one down and pass it around, 4 bottles of beer on the wall.\n4 bottles of beer on the wall, 4 bottles of beer.\nTake one down and pass it around, 3 bottles of beer on the wall.\n3 bottles of beer on the wall, 3 bottles of beer.\nTake one down and pass it around, 2 bottles of beer on the wall.\n2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n1 bottle of beer on the wall, 1 bottle of beer.\nTake one down and pass it around, no more bottles of beer on the wall.\nNo more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.'


HQ9 = lambda c, b=lambda x: '{} bottle{} of beer'.format(x if x > 0 else 'no more', 's' if x != 1 else ''): {'H': 'Hello World!', 'Q': 'Q', '9': ''.join(('{0}{2}, {1} on the wall.\n'.format('{0} on the wall, {0}.\n'.format(b(i)).capitalize(), b(i - 1) if i else b(99), 'Take one down and pass it around' if i else 'Go to the store and buy some more') for i in range(99, -1, -1)))[:-1]}.get(c, None)


def HQ9(code):
	if code == 'H':
		return 'Hello World!'
	if code == 'Q':
		return 'Q'
	if code == '9':
		result = ''
		for n in range(99, 2, -1):
			result += f'{n} bottles of beer on the wall, {n} bottles of beer.\nTake one down and pass it around, {n - 1} bottles of beer on the wall.\n'
		result += '2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n1 bottle of beer on the wall, 1 bottle of beer.\nTake one down and pass it around, no more bottles of beer on the wall.\nNo more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.'
		return result
	return None


def HQ9(code):
	lyrics = '99 bottles of beer on the wall, 99 bottles of beer.\n'
	for i in range(98, 1, -1):
		lyrics += 'Take one down and pass it around, {} bottles of beer on the wall.\n'.format(i)
		lyrics += '{} bottles of beer on the wall, {} bottles of beer.\n'.format(i, i)
	lyrics += 'Take one down and pass it around, 1 bottle of beer on the wall.\n1 bottle of beer on the wall, 1 bottle of beer.\nTake one down and pass it around, no more bottles of beer on the wall.\nNo more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.'
	mapper = {'H': 'Hello World!', 'Q': code, '9': lyrics}
	return mapper.get(code, None)


def HQ9(code):
	if code == 'H':
		return 'Hello World!'
	elif code == 'Q':
		return 'Q'
	elif code == '9':
		text = ''
		for x in range(99, 1, -1):
			text += '{} bottles of beer on the wall, {} bottles of beer.\n'.format(x, x)
			if x - 1 > 1:
				text += 'Take one down and pass it around, {} bottles of beer on the wall.\n'.format(x - 1)
			else:
				text += 'Take one down and pass it around, {} bottle of beer on the wall.\n'.format(x - 1)
		text += '1 bottle of beer on the wall, 1 bottle of beer.\n'
		text += 'Take one down and pass it around, no more bottles of beer on the wall.\n'
		text += 'No more bottles of beer on the wall, no more bottles of beer.\n'
		text += 'Go to the store and buy some more, 99 bottles of beer on the wall.'
		return text
	else:
		return None


def HQ9(code):
	nums = list(map(str, range(99, 0, -1))) + ['no more', '99']
	bofb = lambda x, w=True: f"{x} bottle{'s' * (x != '1')} of beer{' on the wall' * w}"
	(take, store) = ('Take one down and pass it around', 'Go to the store and buy some more')
	phrases = [(f"{(take if x != '99' else store)}, {bofb(x)}.", f'{bofb(x).capitalize()}, {bofb(x, 0)}.') for x in nums]
	lyrics = '\n'.join((f'{x[1]}\n{y[0]}' for (x, y) in zip(phrases, phrases[1:])))
	return {'H': 'Hello World!', 'Q': 'Q', '9': lyrics}.get(code, None)


def HQ9(code):
	if code == 'H':
		return 'Hello World!'
	elif code == 'Q':
		return code
	elif code == '9':
		lyrics = ''
		for index in range(99, 0, -1):
			first = '%d %s' % (index, 'bottles' if index > 1 else 'bottle')
			next = '%s' % (str(index - 1) + ' bottles' if index > 2 else str(index - 1) + ' bottle' if index == 2 else 'no more bottles')
			lyrics += '%s of beer on the wall, %s of beer.\nTake one down and pass it around, %s of beer on the wall.\n' % (first, first, next)
		lyrics += 'No more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.'
		return lyrics
	else:
		return None


def HQ9(code):
	if code == 'H':
		return 'Hello World!'
	elif code == 'Q':
		return code
	elif code == '9':
		output = ''
		for i in range(99, 2, -1):
			output = output + str(i) + ' bottles of beer on the wall, ' + str(i) + ' bottles of beer.\nTake one down and pass it around, ' + str(i - 1) + ' bottles of beer on the wall.\n'
		output = output + '2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n'
		output = output + '1 bottle of beer on the wall, 1 bottle of beer.\nTake one down and pass it around, no more bottles of beer on the wall.\nNo more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.'
		print(output)
		return output
	return None


def HQ9(code):
	if code == 'H':
		return 'Hello World!'
	if code == 'Q':
		return code
	if code == '9':
		line = ''
		for i in range(99, -1, -1):
			if i == 0:
				line += 'No more bottles of beer on the wall, no more bottles of beer.\n'
				line += 'Go to the store and buy some more, 99 bottles of beer on the wall.'
			elif i == 1:
				line += str(i) + ' bottle of beer on the wall, ' + str(i) + ' bottle of beer.\n'
				line += 'Take one down and pass it around, no more bottles of beer on the wall.\n'
			elif i == 2:
				line += str(i) + ' bottles of beer on the wall, ' + str(i) + ' bottles of beer.\n'
				line += 'Take one down and pass it around, ' + str(i - 1) + ' bottle of beer on the wall.\n'
			else:
				line += str(i) + ' bottles of beer on the wall, ' + str(i) + ' bottles of beer.\n'
				line += 'Take one down and pass it around, ' + str(i - 1) + ' bottles of beer on the wall.\n'
		return line
	else:
		pass


def HQ9(code):
	if code == 'H':
		return 'Hello World!'
	if code == 'Q':
		return code
	if code == '9':
		return '\n'.join(['{0} bottles of beer on the wall, {0} bottles of beer.\nTake one down and pass it around, {1} bottles of beer on the wall.'.format(i, i - 1) for i in range(99, 2, -1)]) + '\n2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n1 bottle of beer on the wall, 1 bottle of beer.\nTake one down and pass it around, no more bottles of beer on the wall.\nNo more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.'


def HQ9(code):
	if code == 'H':
		return 'Hello World!'
	elif code == 'Q':
		return 'Q'
	elif code == '9':
		text = ''
		bottles = 99
		for i in range(bottles, 0, -1):
			word = 'bottle' if i == 1 else 'bottles'
			if i > 1:
				s = f'{i} {word} of beer on the wall, {i} {word} of beer.\n'
				word = 'bottle' if i - 1 == 1 else 'bottles'
				s += f'Take one down and pass it around, {i - 1} {word} of beer on the wall.\n'
			else:
				s = f'{i} bottle of beer on the wall, {i} bottle of beer.\nTake one down and pass it around, no more bottles of beer on the wall.\nNo more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.'
			text += s
		return text


HQ9 = lambda i: {'H': 'Hello World!', 'Q': i, '9': '\n'.join([f'{n} bottles of beer on the wall, {n} bottles of beer.\nTake one down and pass it around, {n - 1} bottles of beer on the wall.' if n > 2 else f'{n} bottles of beer on the wall, {n} bottles of beer.\nTake one down and pass it around, {n - 1} bottle of beer on the wall.' if n == 2 else '1 bottle of beer on the wall, 1 bottle of beer.\nTake one down and pass it around, no more bottles of beer on the wall.' if n == 1 else 'No more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.' for n in range(99, -1, -1)])}.get(i, None)


def HQ9(code):
	if code == 'H':
		return 'Hello World!'
	if code == 'Q':
		return 'Q'
	if code == '9':
		out = '\n'.join(['{} bottles of beer on the wall, {} bottles of beer.\nTake one down and pass it around, {} bottles of beer on the wall.'.format(x + 1, x + 1, x) for x in range(98, 1, -1)])
		out += '\n2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n'
		out += '1 bottle of beer on the wall, 1 bottle of beer.\nTake one down and pass it around, no more bottles of beer on the wall.\n'
		out += 'No more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.'
		return out
	return None


def HQ9(code):
	if code == 'H':
		return 'Hello World!'
	if code == 'Q':
		return code
	if code == '9':
		return_string = ''
		for x in range(99, 1, -1):
			if x != 99:
				return_string = return_string + 'Take one down and pass it around, ' + str(x) + ' bottles of beer on the wall.\n'
			return_string = return_string + str(x) + ' bottles of beer on the wall, ' + str(x) + ' bottles of beer.\n'
		return_string = return_string + 'Take one down and pass it around, 1 bottle of beer on the wall.\n1 bottle of beer on the wall, 1 bottle of beer.\nTake one down and pass it around, no more bottles of beer on the wall.\nNo more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.'
		return return_string
	pass


def HQ9(code):
	if code == 'H':
		return 'Hello World!'
	elif code == 'Q':
		return code
	elif code == '9':
		num = 99
		output = ''
		while num >= 0:
			var1 = f"{(str(num) if num > 0 else 'No more')}"
			var2 = '' if num == 1 else 's'
			var3 = num - 1 if num - 1 > 0 else 'no more'
			var4 = '' if num - 1 == 1 else 's'
			output += f'{var1} bottle{var2} of beer on the wall, {str(var1).lower()} bottle{var2} of beer.\n'
			if num > 0:
				output += f'Take one down and pass it around, {var3} bottle{var4} of beer on the wall.\n'
			else:
				output += f'Go to the store and buy some more, 99 bottles of beer on the wall.'
			num -= 1
		return output
	return None


def HQ9(code):
	s = ''
	x = 99
	if code == '9':
		while x >= 0:
			if x - 1 == 0:
				s += f'{str(x)} bottle of beer on the wall, {str(x)} bottle of beer.\nTake one down and pass it around, no more bottles of beer on the wall.\nNo more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.'
				break
			if x > 1:
				s += f'{str(x)} bottles of beer on the wall, {str(x)} bottles of beer.\n'
				if x - 1 > 1:
					s += f'Take one down and pass it around, {str(x - 1)} bottles of beer on the wall.\n'
				else:
					s += f'Take one down and pass it around, {str(x - 1)} bottle of beer on the wall.\n'
			else:
				s += f'{str(x)} bottle of beer on the wall, {str(x)} bottle of beer.\nTake one down and pass it around, {str(x - 1)} bottle of beer on the wall.\n'
			x -= 1
	return {'H': 'Hello World!', 'Q': 'Q', '9': s}.get(code)


def HQ9(code):
	full_song = []
	beer = 99
	for i in range(2, beer):
		lyric = f'{beer} bottles of beer on the wall, {beer} bottles of beer.' + '\n' + f'Take one down and pass it around, {beer - 1} bottles of beer on the wall.'
		beer -= 1
		full_song.append(lyric)
	end = '2 bottles of beer on the wall, 2 bottles of beer.' + '\n' + 'Take one down and pass it around, 1 bottle of beer on the wall.' + '\n' + '1 bottle of beer on the wall, 1 bottle of beer.' + '\n' + 'Take one down and pass it around, no more bottles of beer on the wall.' + '\n' + 'No more bottles of beer on the wall, no more bottles of beer.' + '\n' + 'Go to the store and buy some more, 99 bottles of beer on the wall.'
	full_song.append(end)
	output_song = '\n'.join(full_song)
	phrase = {'H': 'Hello World!', 'Q': 'Q', '9': output_song}
	return phrase.get(code, None)


def HQ9(code):
	x = ''
	bottles = 99
	while bottles > 2:
		x += '%d bottles of beer on the wall, %d bottles of beer.\n' % (bottles, bottles)
		x += 'Take one down and pass it around, %d bottles of beer on the wall.\n' % (bottles - 1)
		bottles -= 1
	x += '2 bottles of beer on the wall, 2 bottles of beer.\n' + 'Take one down and pass it around, 1 bottle of beer on the wall.\n' + '1 bottle of beer on the wall, 1 bottle of beer.\n' + 'Take one down and pass it around, no more bottles of beer on the wall.\n' + 'No more bottles of beer on the wall, no more bottles of beer.\n' + 'Go to the store and buy some more, 99 bottles of beer on the wall.'
	if code == 'H':
		return 'Hello World!'
	elif code == 'Q':
		return 'Q'
	elif code == '9':
		return x
	else:
		return None


def HQ9(code):
	if code == 'H':
		return 'Hello World!'
	elif code == 'Q':
		return code
	elif code == '9':
		song = []
		a = 'bottles of beer'
		b = 'on the wall'
		c = '\nTake one down and pass it around'
		d = 'bottle of beer'
		for i in range(99, 2, -1):
			song.append(f'{i} {a} {b}, {i} {a}.{c}, {i - 1} {a} {b}.')
		song.append(f'2 {a} {b}, 2 {a}.{c}, 1 {d} {b}.')
		song.append(f'1 {d} {b}, 1 {d}.{c}, no more {a} {b}.\nNo more {a} {b}, no more {a}.')
		song.append(f'Go to the store and buy some more, 99 {a} {b}.')
		return '\n'.join(song)


def HQ9(code):
	if code == 'H':
		return 'Hello World!'
	if code == 'Q':
		return code
	if code == '9':
		lyrics = ''
		for i in range(98):
			current_bottle = 99 - i
			next_bottle = 98 - i
			current_bottle_text = 'bottles' if current_bottle > 1 else 'bottle'
			next_bottle_text = 'bottles' if next_bottle > 1 else 'bottle'
			lyrics += f'{current_bottle} {current_bottle_text} of beer on the wall, {current_bottle} {current_bottle_text} of beer.\nTake one down and pass it around, {next_bottle} {next_bottle_text} of beer on the wall.\n'
		lyrics += '1 bottle of beer on the wall, 1 bottle of beer.\nTake one down and pass it around, no more bottles of beer on the wall.\n'
		lyrics += 'No more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.'
		return lyrics
	else:
		return None


def HQ9(code):

	def generate_lyrics():
		rv = '99 bottles of beer on the wall, 99 bottles of beer.'
		for i in range(98, -1, -1):
			plural = '' if i == 1 else 's'
			beers = 'no more' if i == 0 else str(i)
			rv += '\nTake one down and pass it around, {} bottle{} of beer on the wall.'.format(beers, plural)
			rv += '\n{} bottle{} of beer on the wall, {} bottle{} of beer.'.format(beers if beers.isnumeric() else beers.capitalize(), plural, beers, plural)
		else:
			rv += '\nGo to the store and buy some more, 99 bottles of beer on the wall.'
		return rv
	return {'H': 'Hello World!', 'Q': code, '9': generate_lyrics()}.get(code, None)


def HQ9(code):
	if code == 'H':
		return 'Hello World!'
	elif code == 'Q':
		return 'Q'
	elif code == '9':
		result = ''
		for i in range(99, 2, -1):
			iStr = str(i)
			result += iStr + ' bottles of beer on the wall, ' + iStr + ' bottles of beer.\n'
			result += 'Take one down and pass it around, ' + str(i - 1) + ' bottles of beer on the wall.\n'
		result += '2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n'
		result += '1 bottle of beer on the wall, 1 bottle of beer.\n'
		result += 'Take one down and pass it around, no more bottles of beer on the wall.\n'
		result += 'No more bottles of beer on the wall, no more bottles of beer.\n'
		result += 'Go to the store and buy some more, 99 bottles of beer on the wall.'
		return result
print(HQ9('Q'))
print(HQ9('H'))
print(HQ9('A'))
print(HQ9('9'))


def HQ9(code):
	if code == 'H':
		return 'Hello World!'
	if code == 'Q':
		return 'Q'
	if code == '9':
		l = []
		for i in range(99, 0, -1):
			s = '{} bottle{} of beer on the wall, {} {} of beer.'.format(i, 's' if i != 1 else '', i, 'bottle' if i == 1 else 'bottles')
			l.append(s)
			s = 'Take one down and pass it around, {} {} of beer on the wall.'.format(i - 1 if i - 1 != 0 else '', 'bottle' if i == 2 else 'bottles' if i != 1 else '')
			l.append(s)
		l.append('No more bottles of beer on the wall, no more bottles of beer.')
		l.append('Go to the store and buy some more, 99 bottles of beer on the wall.')
		s = '\n'.join(l)
		s = s.replace('  of beer', 'no more bottles of beer')
		return s


def HQ9(code):

	def BB():
		s = ''
		for i in range(99, 0, -1):
			s1 = ' of beer on the wall, {0}'.format(i)
			s2 = ' bottles'
			s3 = ' bottle'
			s4 = ' of beer.\nTake one down and pass it around, '
			s5 = str(i - 1) if i > 1 else 'no more'
			s6 = ' of beer on the wall.\n'
			s += str(i)
			if i > 2:
				s += s2 + s1 + s2 + s4 + s5 + s2 + s6
			elif i == 2:
				s += s2 + s1 + s2 + s4 + s5 + s3 + s6
			elif i == 1:
				s += s3 + s1 + s3 + s4 + s5 + s2 + s6
				s += 'No more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.'
		return s
	return 'Hello World!' if code == 'H' else code if code == 'Q' else BB() if code == '9' else None


def HQ9(code):
	count = 99
	second_count = count - 1
	song = ''
	two_left = '2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n'
	one_left = '1 bottle of beer on the wall, 1 bottle of beer.\nTake one down and pass it around, no more bottles of beer on the wall.\n'
	none_left = 'No more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.'
	if code == 'H':
		return 'Hello World!'
	if code == 'Q':
		return code
	if code == '9':
		while count > 2:
			song = song + str(count) + ' bottles of beer on the wall, ' + str(count) + ' bottles of beer.\nTake one down and pass it around, ' + str(count - 1) + ' bottles of beer on the wall.\n'
			count -= 1
			if count == 2:
				song = song + two_left + one_left + none_left
		return song
	else:
		return None


def bottle():
	song = ''
	for i in range(99, 0, -1):
		if i == 2:
			song += '{} bottles of beer on the wall, {} bottles of beer.\nTake one down and pass it around, {} bottle of beer on the wall.\n'.format(i, i, i - 1)
		elif i == 1:
			song += '{} bottle of beer on the wall, {} bottle of beer.\nTake one down and pass it around, no more bottles of beer on the wall.\nNo more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.'.format(i, i)
		else:
			song += '{} bottles of beer on the wall, {} bottles of beer.\nTake one down and pass it around, {} bottles of beer on the wall.\n'.format(i, i, i - 1)
	return song

def HQ9(code):
	return {'H': 'Hello World!', 'Q': 'Q', '9': bottle()}.get(code, None)


def HQ9(code):
	if code == 'H':
		return 'Hello World!'
	elif code == 'Q':
		return code
	elif code == '9':
		i = 99
		song = ''
		while i > 2:
			song += f'{str(int(float(i)))} bottles of beer on the wall, {str(int(float(i)))} bottles of beer.\nTake one down and pass it around, {str(int(float(i - 1)))} bottles of beer on the wall.\n'
			i -= 1
		return f'{song}2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n1 bottle of beer on the wall, 1 bottle of beer.\nTake one down and pass it around, no more bottles of beer on the wall.\nNo more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.'


BEER = 'bottles of beer'

def HQ9(code):
	if code == 'H':
		return 'Hello World!'
	elif code == 'Q':
		return code
	elif code == '9':
		lyrics = '\n'.join(['{0} {1} on the wall, {0} {1}.\nTake one down and pass it around, {2} {1} on the wall.'.format(i, BEER, i - 1) for i in range(99, 2, -1)])
		lyrics += '\n2 bottles of beer on the wall, 2 bottles of beer.\n' + 'Take one down and pass it around, 1 bottle of beer on the wall.\n' + '1 bottle of beer on the wall, 1 bottle of beer.\n' + 'Take one down and pass it around, no more bottles of beer on the wall.\n' + 'No more bottles of beer on the wall, no more bottles of beer.\n' + 'Go to the store and buy some more, 99 bottles of beer on the wall.'
		return lyrics


def HQ9(code, number=99):
	if code == 'H':
		return 'Hello World!'
	elif code == 'Q':
		return 'Q'
	elif code == '9':
		if number == 1:
			return '1 bottle of beer on the wall, 1 bottle of beer.\nTake one down and pass it around, no more bottles of beer on the wall.\nNo more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.'
		elif number == 2:
			return '2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n' + HQ9(code, number - 1)
		elif number >= 3:
			return str(number) + ' bottles of beer on the wall, ' + str(number) + ' bottles of beer.\nTake one down and pass it around, ' + str(number - 1) + ' bottles of beer on the wall.\n' + HQ9(code, number - 1)
	return


def HQ9(code):
	bottles = 100
	res = ''
	if code == 'H':
		return 'Hello World!'
	elif code == 'Q':
		return 'Q'
	elif code == '9':
		for i in range(99):
			if bottles == 3:
				res += '2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.'
				bottles -= 1
			elif bottles == 2:
				res += '\n1 bottle of beer on the wall, 1 bottle of beer.\nTake one down and pass it around, no more bottles of beer on the wall.'
				res += '\nNo more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.'
			else:
				bottles -= 1
				res += '{} bottles of beer on the wall, {} bottles of beer.\nTake one down and pass it around, {} bottles of beer on the wall.\n'.format(bottles, bottles, bottles - 1)
		return res