Maximum input and runtime issue

Can anyone give me a suggestion on how to take input in Python3 without a line break after each input() for this problem?