HW1 and naive solution for HW2.