Non-thermal electrons from solar nanoflares