Why my Python Code is showing RUN TIME ERROR(NZEC)

My code is showing Run Time Error(NZEC) for the question WORD VERSE

My Code -

test = input()

for i in xrange(0,test):

    x = raw_input()
    a = x.split()
    s =""
    for j in xrange(len(a),0,-1):
        s = s+a[j-1]+" "
    print "Case #"+str(i+1)+":"+" "+s
//