private static void stringSim(String str) {
		int totalCount = str.length();
		for (int i = 1; i < str.length(); i++) {
			if (kmpSearch(str, str.substring(i))) {
				System.out.println(str.substring(i));
				totalCount += str.substring(i).length();
			}
		}
		System.out.println(totalCount);
	}