SUBS using KMP search
Removed debug prints and extra import.
CONS Solution.