This is from Clive Maxfield’s post on DesignLine, How to invert three signals with only two NOT gates. This solution is located toward the bottom of the page.

Logic Gate spoiler 1