<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write(p, line):
 """Send and flush a single line to the subprocess' stdin."""

    log.debug('%s <- %r', p.args, line)
    p.stdin.write(line)
    p.stdin.flush()