<s>[INST] import os
import glob

def fct_file_list():
    #Get the current directory
    current_dir = os.getcwd()
    #Get the files from the current directory
    file_list = glob.glob("*.txt")
    #print(file_list)
    return file_list

def fct_sort_file_list(file_list):
    #sort the list of files in the ascending order
    asc = sorted(file_list)
    #print(asc)
    return asc

def fct_file_content(asc):
    #take the first file and read its content
    content = open(asc[0], 'r').read()
    #to make the content ready to encrypt
    content = content.replace("\n", "")
    return content

def fct_vigenere_cipher(content):
    #Vigenere Cipher encryption
    keyword = 'cryptography'
    #convert the keyword to a list of integers
    keyword = [ord(i) for i in keyword]
    #convert content to a list of integers
    content = [ord(i) for i in content]
    #Encryption
    cipher = [(content[i] - 97 + keyword[i % len(keyword)] - 97) % 26 + 97 for i in range(len(content))]
    cipher = ''.join([chr(i) for i in cipher])
    return cipher

def fct_decryption(cipher):
    #decryption
    keyword = 'cryptography'
    keyword = [ord(i) for i in keyword]
    cipher = [ord(i) for i in cipher]
    #decryption
    decryption = [(cipher[i] - 97 - keyword[i % len(keyword)] + 97) % 26 + 97 for i in range(len(cipher))]
    decryption = ''.join([chr(i) for i in decryption])
    return decryption

def main():
    file_list = fct_file_list()
    asc = fct_sort_file_list(file_list)
    content = fct_file_content(asc)
    cipher = fct_vigenere_cipher(content)
    print(f"File name: {asc[0]}")
    print(f"Content: {content}")
    print(f"Cipher: {cipher}")
    decryption = fct_decryption(cipher)
    print(f"Decryption: {decryption}")
    print(f"Is {content} == {decryption}?[/INST]