K-neighbor substrings

UVALive - 4671