How are traits inherited?