Average reference specification in Custom Montage

Fore each line, with a custom montage, you'd have to explicitly compute this average reference, i.e. sum of all the electrodes divided by the number N of electrodes included in the average (replace X with the actual value 1/N):

Fp1|333333 : Fp1, -X*Fpz, -X*Fp2, -X*F3, .......

This is very impractical. Alternatively, you can add the EEG average reference as a linear operator in the continuous file, and then use the simple montage you posted. If you haven't followed this EEG tutorial yet, I recommend you do so before going further with the analysis of your own recordings.
https://neuroimage.usc.edu/brainstorm/Tutorials/Epilepsy#Average_reference