Wrote problem statement and solution method.
Adding gitignore.
Adding gitignore.
Getting input
Creating transitive closure
Trimming the redundant edges.
Solved the problem!