Step 2+3: unknown amount of numbers, handle newlines