{% for file_name, contents_values in document_dictionary.items() %}
{% if contents_values is mapping %}
{% set contents_values = (contents_values.values()|list) %}
{% else %}
{% set contents_values = (contents_values[0]|list) %}
{% set file_name = file_name[-1] %}
{% endif %}
{% if contents_values[0] == 'sym' %}
{{ contents_values[0] }} {{ file_name }} -> {{ contents_values[1:]|join(' ') }}
{% else %}
{{ contents_values[0] }} {{ file_name }}{% if contents_values[1:] %} {{ contents_values[1:]|join(' ') }}{% endif %}

{% endif %}
{% endfor %}
