Update Parent field from latest Child record field

Hi all,

I am new to scripting.
Please help me to write a custom script for the following case.
Any help is really appreciated.

Parent doctype : Case Maintenance
parent field : status
Child doctype : Case Resolution
child field : reso_status

Parent (case) can have multiple rows of child records (resolutions). Everytime, a new resolution row is appended ,the reso_status of the this child record (latest row) will update status field in the parent doctype.

The reso_status is a select data type with multiple options inside.