def normalize(lines: str) -> str:
	""" Remove trailing whitespace from each line, 
	    keeping all line breaks except the last."""

	return '\n'.join(line.rstrip() for line in lines.strip().splitlines())