<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def read(ctx, input, output):
 """Output processed document elements."""

    log.info('chemdataextractor.read')
    log.info('Reading %s' % input.name)
    doc = Document.from_file(input)
    for element in doc.elements:
        output.write(u'%s : %s\n=====\n' % (element.__class__.__name__, six.text_type(element)))