
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
The permutation  $\sigma$  consisting of four words  $A,B,C,D$  has  $f_{AB}(\sigma)$ , the sum of the number of  $B$  placed rightside of every  $A$ . We can define  $f_{BC}(\sigma)$ , $f_{CD}(\sigma)$ , $f_{DA}(\sigma)$  as the same way too. 
For example,  $\sigma=ACBDBACDCBAD$ ,  $f_{AB}(\sigma)=3+1+0=4$ ,  $f_{BC}(\sigma)=4$ , $f_{CD}(\sigma)=6$ ,  $f_{DA}(\sigma)=3$ Find the maximal value of  $f_{AB}(\sigma)+f_{BC}(\sigma)+f_{CD}(\sigma)+f_{DA}(\sigma)$ , when  $\sigma$  consists of  $2020$  letters for each  $A,B,C,D$ 

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