Added: solution to first logic problem.