
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Given  $2018 \times 4$  grids and tint them with red and blue. So that each row and each column has the same number of red and blue grids, respectively. Suppose there're  $M$  ways to tint the grids with  the mentioned requirement. Determine  $M \pmod {2018}$ .  

Present the answer in LaTex format: \boxed{Your answer}
user