def type(filename):
    if filename.endswith('.py'):
        return 'python'
    elif filename.endswith('.rb'):
        return 'ruby'
    elif filename.endswith('.js'):
        return 'javascript'
    elif filename.endswith('.html'):
        return 'html'
    elif filename.endswith('.css'):
        return 'css'
    elif filename.endswith('.txt'):
        return 'text'
    elif filename.endswith('.md'):
        return 'markdown'
    elif filename.endswith('.json'):
        return 'json'
    elif filename.endswith('.xml'):
        return 'xml'
    elif filename.endswith('.yml'):
        return 'yaml'
    elif filename.endswith('.sh'):
        return 'shell'
    elif filename.endswith('.c'):
        return 'c'
    elif filename.endswith('.jpg'):
        return 'image'
    elif filename.endswith('.png'):
        return 'image'
    elif filename.endswith('.gif'):
        return 'image'
    elif filename.endswith('.svg'):
        return 'image'
    elif filename.endswith('.mp4'):
        return 'video'
    elif filename.endswith('.mp3'):
        return 'audio'
    elif filename.endswith('.pdf'):
        return 'pdf'
    elif filename.endswith('.zip'):
        return 'zip'
    elif filename.endswith('.tar'):
        return 'tar'
    elif filename.endswith('.gz'):
        return 'gz'
    elif filename.endswith('.bz2'):
        return 'bz2'
    elif filename.endswith('.xz'):
        return 'xz'
    elif filename.endswith('.7z'):
        return '7z'
    elif filename.endswith('.rar'):
        return 'rar'
    elif filename.endswith('.docx'):
        return 'docx'
    elif filename.endswith('.xlsx'):
        return 'xlsx'
    elif filename.endswith('.pptx'):
        return 'pptx'
    elif filename.endswith('.doc'):
        return 'doc'
    elif filename.endswith('.xls'):
        return 'xls'
    else:
        return 'unknown'
