he was walking along a deserted beach throwing a stick to a dog which had come from nowhere but which gleefully ran after the stick and brought it back and stood with its tail wagging expectantly and his tongue lolling .