6. There are 5 boxes, each box has a key, and the keys cannot be used. If a key is randomly placed inside one of the boxes, and then all the boxes are locked. Now, if you are allowed to open one box, so that you can subsequently use the keys to open the remaining 4 boxes, then the number of ways to place the keys is $\qquad$ kinds.
6. 4!.

First, in the opened box, there must be the key of another positive box $i_{1}$, in box $i_{1}$ there is the key of box $i_{2}$, in box $i_{2}$ there is the key of box $i_{3}$, in box $i_{3}$ there is the key of box $i_{4}$, and the opened box is $i_{5}$. This is equivalent to $1,2,3,4,5$ forming a circular permutation.

Conversely, for each circular permutation formed by $1,2,3,4,5$, it can also correspond to a method of placing keys to successively open each box. First, let the 5 boxes sit in sequence along the circle, then place the key of the box below each box (as shown in Figure 5), which results in a method of placing keys to successively open each box. Therefore, the number of methods to place keys so that all boxes can be successively opened is equal to the number of circular permutations of $1,2,3,4,5$.

Since each circular permutation (as shown in Figure 5) can be straightened into 5 permutations: $i_{1}, i_{2}, i_{3}, i_{4}, i_{5} ; i_{2}, i_{3}, i_{4}, i_{5}, i_{1} ; i_{3}, i_{4}, i_{5}, i_{1}, i_{2} ; i_{4}$, $i_{5}, i_{1}, i_{2}, i_{3} ; i_{5}, i_{1}, i_{2}, i_{3}, i_{4}$. Conversely, 5 such permutations correspond to one circular permutation, so the number of circular permutations of 5 elements is $5^{\prime}-1!=2 \prime$ (ways).