How does the lottery work?