Python: Lazy FM-index.py