3^{6 }-(3C2 * 2^{6 }- 3C1 * 1^{6 }) :-
(3C2 * 2^{6 }- 3C1 * 1^{6 }):- here we are removing the case when balls are distributed only between two persone(3C2 * 2^{6 }) ...means balls are distributed either AB,BC or CA now for all these cases ...there is a chance that balls are given two only one (for AB only A or ONLY B) ...for all A,B,C this would happen two times there for we would add this one more time.....(3C1 * 1^{6})