Sponsored
Use these hints if you're stuck. Try solving on your own first.
Find all synonymous groups of words.
Use union-find data structure.
By backtracking, generate all possible statements.
Solve with full IDE support and test cases