LilyPond writes sharps and flats as part of the note name, not as separate symbols. A sharp is is and a flat is es.

Match the target by writing a chromatic line from C up to G using sharps.

LilyPond manual reference

Target

Your Result

Click Check to compile and compare