Compose melodies adhering to the given motif and the outlined musical structure.
X:1
L:1/8
M:12/8
K:G
['DEF GAB cBA d3', 'EFG ABc dBA G2'  
X:1
L:1/8
M:12/8
K:G
|: DEF GAB cBA d3 | def gdd edB dBG | DEF GAB cBA d3 |1 def gdB AGF G2 D :|2 def gdB cBA G2 g |: 
 gGG fGG edB dBG | EFG EFG ABc def | gGG fGG edB dBG |1 EFG ABc dBA G2 g :|2 EFG ABc dBA G2 D ||  