def Format():
	try:
		while True:
			for g in range( 5 ): 	# groups of 5 blocks
				for b in range( 4 ): # blocks of 4 characters
					while True:
						ch = (yield) # receive from send
						if '\n' not in ch:
							break
					print( ch, end='' ) # receive from send
				print( '  ', end='' ) # block separator
			print()					# group separator
	except GeneratorExit:			# destructor
		if g != 0 | b != 0:			# special case
			print()

input = "abcdefghijklmnop\nqrstuvwx\nyzxxxxxxxxxxxxxx\n"

fmt = Format()
next( fmt )							# prime generator
for i in input:
	fmt.send( i );				# send to yield

# Local Variables: #
# tab-width: 4 #
# compile-command: "python3.7 Format.py" #
# End: #
