Write a command-line tool that reads a dependency graph from stdin and outputs either a valid topological…
Write a command-line tool that reads a dependency graph from stdin and outputs either a valid topological…: a task in termgrade-bandcentral-gemma4-31b-bash: TermGrade Band-Central: the 151-task selection and its splits (Harbor dataset). Input format (stdin): - Each line is one dependency: A - B…
The task
**Input format (stdin):** - Each line is one dependency: `A -> B` meaning "A depends on B" (B must come before A). - Whitespace around `->` and node names is arbitrary (spaces/tabs allowed). - Lines may be empty or contain only whitespace (ignore them). - Node names are case-sensitive strings of non-whitespace…