while True:
try:
n = int(input())
print(n)
except EOFError:
break
I change the code above bit, to make it faster. like down below
import sys
while True:
try:
n = int(sys.stdin.readline())
print(n)
except EOFError:
break
but I realized that sys.stdin.readline() doesn't make EOFError after I ran it. than input() is the only way to run the loop that I wrote? or is there any way faster than input