title: Getting EOF Error while giving inputs to code
body: <p>I tried a problem from SPOJ called The next palindrome. The problem statement is given as</p>
  <blockquote>
  <p>A positive integer is called a palindrome if its representation in the decimal system is the same when read from left to right and from right to left. For a given positive integer K of not more than 1000000 digits, write the value of the smallest palindrome larger than K to output. Numbers are always displayed without leading zeros.</p>
  </blockquote>
  <p>Here is my code</p>
  <pre><code>def palindrome(n):
      return True if n[::-1] == n else False
  
  t = int(input())
  for i in range(t):
      li = []
      n = input()
      for j in range(int(n) + 1, 1000000 + 1):
          if palindrome(str(j)) == True:
              li.append(j)
      print(li[0])
  </code></pre>
  <p>I tried giving an input like this</p>
  <pre><code>1
  1000000
  </code></pre>
  <p>I am getting an error like this</p>
  <pre><code>Traceback (most recent call last):
    File &quot;./prog.py&quot;, line 7, in &lt;module&gt;
  EOFError: EOF when reading a line
  </code></pre>