LeetCode 552: Student Attendance Record II
Tips:

The first argument self can be renamed to something shorter.
Use while n:n-=1 to loop n times
(Python 2 specific) You can use a single tab for the second level of indentation, instead of 2 spaces.
For this problem, it's sufficiently fast to just mod b every loop, instead of having to mod both a and d.
The part a,b,c,d,e,f=... can be broken into a,b,c=...;d,e,f=..., which allows reusing the updated value a=a+b+c
c,e,f can be initialized to 10**9+7 instead of 0 (found by @xnor).

Python 2, 136 134 131 127 125 bytes

class Solution:
 def checkRecord(_,n):
&#9;a=b=d=1;c=e=f=M=10**9+7
&#9;while n:n-=1;a,b,c=a+b+c,a%M,b;d,e,f=a+d+e+f,d,e
&#9;return d%M

Try it online!