Sponsored
Use these hints if you're stuck. Try solving on your own first.
Try treating this as a graph problem.
Each variable is a node, and each equation is an edge.
Try performing DFS multiple times to find contradictions.
Solve with full IDE support and test cases