Solutions of exercises from chapters 1-3