Almost got the points about how to code for lottery scheduling