def METHOD_NAME(contest: Contest, root: ET.Element):
    for id, key, name in Language.objects.all().values_list('id', 'key', 'name'):
        language = ET.SubElement(root, 'language')
        language.tail = '\n'
        ET.SubElement(language, 'id').text = str(id)
        ET.SubElement(language, 'key').text = key
        ET.SubElement(language, 'name').text = name