I cannot write the solution, but you are close.
Just listen carefully the melody and try to reproduce it
Ohhhhhhhhh I just noticed it now, I got to the ending, thanks!