Lawful Good alignment

I think for lawful good or evil, they follow the law - it’s the law itself which is good or evil

The question is which law, and what if the law contradicts itself?