Solutions for exam 1: version 1version 2version 3