Brute Force Solution for String Matching