Given a maximum line width and a block of text, wrap it into lines using a greedy algorithm: add words to the current line as long as it (plus a single separating space) fits within the width; otherwise start a new line. A single word longer than the width gets its own line unmodified.
Input:
- Line 1: the width (integer)
- Line 2: the text
Output: the wrapped text, one output line per line.