Driver Code
public static void main ( String [ ] args ) { String str = " Z - kmalgorithmkmiskmkmkmhelpfulkminkmsearching " ; String word = " km " ; System . out . print ( goodStr ( str , word ) ) ; } }