text = ['a', 'c', 'a', 'a', 'b', 'c']
pattern = ['a', 'a', 'b']
print 'text =',text
print 'pattern =',pattern
for s in range (0, len(text)-len(pattern)+1):
	print 'testing s=',s
	for i in range (0, len(pattern)):
		if pattern[i] != text[i+s]:
			print pattern[i], 'is not', text[i+s], 'increasing s'  
			break
		else:
			print pattern[i], 'is', text[i+s], 
			if i == len(pattern)-1:
				print 'match found at s=', s
			else:
				print 'testing next letter'
	print 
