Third harmonic working based on the Smith–Purcell radiation in a closed structure