How many length ten strings consisting of only $A$s and $B$s contain neither "$BAB$" nor "$BBB$" as a substring?