@Pe***
Anywhere, you need a ticket leaving Thailand within the period of time you'd be permitted entry to. If you're entering on a 30 day visa exemtion, you need a ticket leaving THailand before that 30 days would expire.
Book a refundable ticket, cancel it once you enter Thailand. Immigration doesn't care, normally it's the airline that will refuse you boarding.