5 different mangoes 4 different oranges and 3 different apples be distributed among 3 children such that each gets at least one mango? In how many ways can $5$ different mangoes $4$ different oranges and $3$ different apples be distributed among $3$ children such that each gets at least one mango?
My try:
I selected any $3$ mangoes from 5 by $\binom{5}{3}$ and arranged them by multiplying $3!$. Now the remaining fruits are 2 mangoes, 4 oranges and 3 apples (all distinct). These 9 objects can be distributed among 3 children in $3^9$ ways. So, final answer should be $\binom{5}{3}\cdot3!\cdot3^9$ but my answer is wrong.
Where did I go wrong?
 A: We can see that the process of distributing each fruit is independent of each other, so we can just multiply the number of distributions for each fruit for the total number of distributions.
As you have already noted, the number of ways to distribute the 7 fruits that are not mangoes is $3^7$.
The number of ways to distribute the 5 mangoes will be $3!S(5,3)$, where $S(n,k)$ is the stirling numbers of the second kind. There are several ways to go about computing this: using a table of values, using the recurrence, using the explicit formula, or generating functions. I'll just show the generating functions method, as the other ones are rather trivial to apply if you already know the formula.
This is the coefficient of $x^5$ in the expansion of
$$5!(x+\frac{x^2}{2!}+\frac{x^3}{3!}+\ldots)^3$$
Using the taylor series of $e^x$, we get that this is equivalent to the coefficient of $x^5$ in
$$5!(e^x-1)^3$$
$$5!(e^{3x}-3e^{2x}+3e^x-1)$$
Since the coefficient of $x^5$ in $e^{kx}$ is $\frac{k^5}{5!}$, this is equivalent to
$$3^5-3\cdot 2^5+3$$
$$150$$
Hopefully you see the semblance to the explicit formula for the stirling numbers of the second kind.
This means that the number of ways to distribute the mangoes is $150$ and the number of ways to distribute all $12$ fruits is $\boxed{150\cdot 3^7}$.
