How to debug this bug when reversing an array

This is my code in python 3 trying to reverse an array. The code gives output and shows a run time exception.

for N in range(int(input())):
    arr = str(input())
    print(''.join(map(str, reversed(arr))))

Exception I am facing:

 File "", line 2, in <module>
    arr = str(input())
    EOFError: EOF when reading a line