Solutions for chapter 12