In the final scene, a nun is shown holding the winning ticket, which is presumably the one Gary bought. He only purchased the one set of numbers, but the ticket is shown with what appears to be several lines of numbers.
When Gary is sneaking into the mayor's house the police radio in the squad car in front gives an address of assignment to an officer of 1518 W. 158th st. The address in fact is located in.the town of Harvey and about five miles south of Chicago borders.
Given that Flanagan was manipulating the lottery, it seems sloppy to not only write down the numbers to be picked, but to leave the numbers on the mayor's desk.