See the attachment program below