Write a command-line tool toposort that reads a dependency graph from stdin and outputs either a valid…
Write a command-line tool toposort that reads a dependency graph from stdin and outputs either a valid…: a task in termgrade-bandcentral-gemma4-31b-bash: TermGrade Band-Central: the 151-task selection and its splits (Harbor dataset). Input format (stdin, UTF-8): - One line per node, format…
The task
**Input format** (stdin, UTF-8): - One line per node, format: `NODE:DEP1,DEP2,DEP3,...` - NODE is a non-empty string of printable ASCII (no colons, no commas, no whitespace) - Dependencies are comma-separated (may be empty, meaning no dependencies) - Lines may arrive in any order - Input may contain blank lines…