NEXTNUM - Runtime Error due to unsanitized input

Submission above gets runtime error while being correct.

The issue is that I have to sanitize the input. Turns out there are characters that are not digits in a test case string line.

Submission above passes once I take only digits from a line.

Thanks for reporting. This is fixed.