Compose melodies adhering to the given motif and the outlined musical structure.
X:1
L:1/8
M:4/4
K:D
['(3Bcd eg', 'A2 faaf g4 abag fdde faaf g2'  
X:1
L:1/8
M:4/4
K:D
 ABdB A2 FA | (3Bcd AF GFEG | F D3 F A3 |1 (3Bcd eg fddB :|2 (3Bcd eg fd d2 || faaf g2 ef | 
 gfed cA A2 | faaf g4 | abag fdde | faaf g2 ef | gfed cAAc | BABd c3 e | dfag fddB ||  