I have a task that I don't know how to approach. There are $n$ baskets of four types; $n$>1000. Each basket fits exactly one ball. Number of balls equals number of baskets. Balls are of different kinds as well. Basket of kind $1$ may accommodate only balls of kinds $1$ or $2$. Basket of kind $2$ fits balls of kind $3$ or $4$. Baskets of kind $3$ fits all kinds of balls ($1$, $2$, $3$, or $4$). And basket of kind $4$ fits balls of kinds $1$, $2$, or $3$. In how many ways can these balls be distributed?