Construct melodies utilizing the provided motif and adhere to the outlined musical structure.
X:1
L:1/8
Q:1/2=110
M:2/2
K:Dmin
['A2 d2', "a6 fg agfg a2 b2 c'2 g4"  
X:1
L:1/8
Q:1/2=110
M:2/2
K:Dmin
 A2 | d2 A2 d2 e2 | f2 gf e2 ag | fe d2 f2 g2 | a6 :: fg | agfg a2 b2 | c'2 g4 dc | BAGA B2 c2 | 
 A2 F4 cB | AB c2 Bc d2 | cd e2 A2 a2 | f2 ed e2 ^c2 | d6 :|  