Solutions for the first part of 99 Prolog problems