How to implement a boolean function using just NAND or NOR logic Gates
Both a NAND and a NOR, with both inputs connected together will give you a NOT.

A NOT on the output of a NAND will give you an AND, and likewise a NOR will give you an OR.

NOTs on all inputs of a NAND will give you an OR, and likewise a NOR will give you an AND.

You can now make all the familiar logic functions from just a NAND or NOR prototype. Now implement the expression in the straightforward way.