﻿Implement the Knuth-Morris-Pratt (KMP) string matching algorithm in Python:
1. Build the failure function (partial match table) for the pattern.
2. Use the failure function to search for all occurrences of the pattern in the text.
3. Output all starting indices where the pattern occurs.
4. Include a step-by-step trace showing the failure function construction for pattern "ABABCABAB".
5. Test with: text = "ABABDAABABCABABABABCABAB", pattern = "ABABCABAB". Verify all match positions.
