<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def export_symbols(self):
 """ Exports all used symbols """

        session = self.open_session()
        links = session.query(AssetClassStock).order_by(
            AssetClassStock.symbol).all()
        output = []
        for link in links:
            output.append(link.symbol + '\n')

        # Save output to a text file.
        with open("symbols.txt", mode='w') as file:
            file.writelines(output)

        print("Symbols exported to symbols.txt")