A solution to the HFC# Lab 2 exercise