How many everywhere defined functions are not $ 1$ to $1$ I am stuck with the following question,
How many everywhere defined functions from S to T are not one to one
S={a,b,c,d,e}
T={1,2,3,4,5,6}

Now the teacher showed that there could be $6^5$ ways to make and everywhere defined function and $6!$ ways of it to be $1$ to $1$ but when I drew them on paper I could drew no more than 30, here are those,
$(a,1),(a,2).........(a,6)$$(b,1),(b,2).........(b,6)$$(c,1),(c,2).........(c,6)$$(d,1)(d,2).........(d,6)$$(e,1)(e,2).........(e,6)$ 
Can anyone please help me out with how there are $6^5$ functions? Thanks

Here is another way of looking at the question. Each function from $S$ to $T$ can be thought of filling balls($S$) into boxes($T$). You have six boxes numbered $1,2,3,4,5$ and $6$ and five balls named $a,b,c,d,$ and $e$. In how many ways can these five balls be placed in those six boxes? Each of the five balls can go to any of the six boxes, so it is $6^5$ (called product rule in combinatorics).
