First thing you'd try:
P = abc T = abaccbabacbaabcabacabacccaabbca... abc abc abc abc... ...abc
Test the pattern at every position of the text.