AMC 10A 2021 Spring Problem 25

How many ways are there to place 3 indistinguishable red chips, 3 indistinguishable blue chips, and 3 indistinguishable green chips in the squares of a 3 \times 3 grid so that no two chips of the same color are directly adjacent to each other, either vertically or horizontally?

Answer Choices
A. 12
B. 18
C. 24
D. 30
E. 36