updated TicketLottery puzzle solution