40049 in words is written as :

Forty Thousand Forty Nine