string in a sequence in python : <p>I am solving a problem in codechef which is </p>

<blockquote>
  <p>Chef has a sequence of N numbers. He like a sequence better if the sequence contains his favorite sequence as a substring.
  Given the sequence and his favorite sequence(F) check whether the favorite sequence is contained in the sequence</p>
  
  <p>Input</p>
  
  <p>The first line will contain the number of test cases and are followed
  by the cases.  Each test case consists of four lines: The length of
  the sequence, the sequence N,the length of F and the sequence F </p>
  
  <p>Output</p>
  
  <p>Print "Yes" if the sequence contains the favourite sequence int it
  otherwise print "No" Constraints</p>
</blockquote>

<pre><code>1&lt;=T&lt;=10 
    1 1
    Input:
    2
    6
    1 2 3 4 5 6
    3
    2 3 4
    6
    22 5 6 33 1 4
    2
    4 15


    Output:
    Yes
    No
</code></pre>

<p>to this I wrote 
`</p>

<pre><code>for _ in xrange(int(raw_input())):
    raw_input()
    s = raw_input()
    raw_input()
    f =  raw_input()
    print "Yes" if f in s else "No"`
</code></pre>

<p>it returns correct result  (as far as I have checked ) bu the grader returns wrong. why is this wrong ?</p>
