Maher-shalal-hash-baz (Baz for short) is Ned Flanders' pet dog.
Shortly later in the episode, however, Baz came over to the Simpsons' house and started pawing at the door. Homer opened it and Baz ran into the house, running around and playing with him.
Homer chose to play with her too. Santa's Little Helper saw this and became very jealous. Eventually, Baz started spending way more time with Homer than with Ned and started to like him better.
Eventually, Ned finally realized that Baz liked Homer more and with great misery, gave her up to him. Homer didn't want to have Baz if Ned was going to be so upset without her so he gave her back to Ned. Baz suddenly started liking Ned again. At the end of the episode, Baz came back to the Simpsons' house again and went to see Santa's Little Helper. At first, he was ticked off to see her there, but soon, they started playing around and having fun as friends.