A dog sat in front of a man and shook hand with him before running away