Grammar for the language L in {a, b} where L = {w | na (w) mod 3 = 0}

I can form the regular expression but I am not sure with the grammar.
I have tried the following:

S -> yyyy | bS | b | lambda

Someone please guide me.

Zulfi