18787 in words is written as :

Eighteen Thousand Seven Hundred and Eighty Seven