f = A'B'C' + A'B'C + AB'C + A'BC

Which i've simplified to

f=A'B' + B'C + A'C

Ive been trying for hours but i cant seem to find an answer.

I don't think its possible

There was a hint that said that it may be appropriate to use P=A+B but the final answer must be in terms of A,B and C

The gates can have any number of inputs.

the problem could also be that i interpreted the question wrong and

f = A'B'C' + A'BC + ABC + AB'C which simplifies to

f = A'B'C' + AC + BC

Either way, i cant make the circuit.