Step 1) Give yourself the tonic pitch and sing each of the given melodies.
Step 2) For each melody, identify the short melodic motifs that are used to generate it.
Step 3) Choose one of the melodies. Start singing it, but improvise a different melodic path for it to take, chaining together the given motifs in new ways. Start small, changing only a few notes near the end, then try it again and again, changing more each time.
Sing and complete each melody by extending the given sequence until you reach a satisfying arrival on the tonic.