[Bug] There is no Spoon - Episode 2

I posted this within “There is no Spoon - Eposode 2 puzzle discussion” but realised bug reports may not hit the right audience so decided to open new topic (no search yielded such behaviour):

I hit weird problem which looks like a bug in interpreter.

In short - in the main data loop at some point script times out in reading next line of input.

It times out on test 5 but does not time out on last (and most complex) test case.

This looks like the environment was not feeding data to the script causing timeout. The way I looked at it was to print debug message before and after line = input() - for the last line of input second debug is missing (suggesting timeout on data input)

I don’t believe this times out due to time constraints for (a) complex test case gets loaded ok and (b) I don’t do much at this stage of the script (read line after line and parse each character to see if it’s . or a number)

I conducted another test which also points to this as potential bug in Python3 interpreter - if I comment out all my code behind that data input loop all lines of input are fed in correctly. If if undo commenting out then last line of input is not being served. The reason why I think this is a bug is because commented code could not be executed since interpreter was timing out on input feed - so commented code could not contribute to timeouts.

Please advise,