12187 in words is written as :

Twelve Thousand One Hundred and Eighty Seven