title: Unable to get solution correct for submission
body: <p>It is a sample problem for practice (<a href="https://practice.geeksforgeeks.org/contest-problem/sahil-loves-gfg/0/" rel="nofollow noreferrer">here</a>), and is not getting accepted due to it giving 'wrong answer'. It is compiling fine, but might be for different test inputs failing on submission.<br>
  I just request comment for the same, as hope that the issue must be small. </p>
  
  <p>The problem statement is: <br>
  The program should accept first line of input as no. of strings, s.t.  it is less than 10. And the next lines should contain one string each of length less than 100 characters. Need find occurrence of "gfg" in the strings.
  If no occurrence is found, -1 should be returned.</p>
  
  <pre><code>#code
  t = int(input())
  if t &gt; 10 or t&lt;0:
      exit()
  arr = [[0] for i in range(t)]
  total = [[-1] for i in range(t)] 
  
  
  for i in range(t):
      arr[i] = [k for k in input().split()[:1]]  
      for j in arr[i]:
          total[i] = j.count("gfg")
          if total[i]==0: total[i]=-1
          print (total[i]) 
  </code></pre>