For the second arrangement, there are a (5,5)/[a (2,2 5)/[a (2 2,2)] = 5 * 4 * 3 * 2 *1[2 * 2] = 30 kinds, in which a (5,5) means that the number of repetitions is not considered temporarily.
Note: (The number before the comma is in the lower right corner of A or C, and the number after the comma is in the upper right corner of A or C, the same below! )