Sponsored
Use these hints if you're stuck. Try solving on your own first.
Use Longest Prefix Suffix (KMP-table) or String Hashing.
Solve with full IDE support and test cases