How dogs and cats teach their offspring to use the stairs