A $3$-input majority gate is defined by the logic function $M(a,b,c)=ab+bc+ca$. Which one of the following gates is represented by the function $M(\overline{M(a,b,c)}, M(a,b,\overline{c}),c)$?

- $3$-input NAND gate
- $3$-input XOR gate
- $3$-input NOR gate
- $3$-input XNOR gate