Prolog - List Operations In words