Since there are no specific instructions, I'll give you the necessary information you need in order to map a diagram of the given sentence.
1. The mistake taught us a costly lesson.
The mistake- subject
taught us a costly lesson- predicate
2. The mistake taught us a costly lesson. (S-V-IO-DO)
The mistake- subject
taught- verb
us- indirect object
a costly lesson- direct object
3. The mistake taught us a costly lesson.
The- article
mistake- noun
taught-verb
us- pronoun
a- article
costly-adjective
lesson- noun