HF RL Explorer

Write a Python script that reads a dependency specification from stdin and outputs either a valid…

Write a Python script that reads a dependency specification from stdin and outputs either a valid…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input format : One line per node. Each line has the format name: dep1 dep2 ... where name is a non-empty string and…

The task

**Input format**: One line per node. Each line has the format `name: dep1 dep2 ...` where `name` is a non-empty string and dependencies are space-separated strings. A node with no dependencies has the format `name:`. Lines may be empty (skip them). The input may contain trailing newlines.

Part of ai-and/termgrade-environments.