ex8_5_2.mod:

Reference:

Solution: