Prolog Program 2: A Day at the River