Construct melodies utilizing the provided motif and adhere to the outlined musical structure.
X:1
L:1/8
M:2/2
K:D
['d2 Ad', 'af f2'  
X:1
L:1/8
M:2/2
K:D
 d2 Ad BdAB | (3ddd fd edBc | d2 Ad BdAd | (3Bcd ef gefe | d2 Ad BdAB | (3ddd fd edBc | 
 d2 Ad BdAd | (3Bcd ef gefg |] af f2 df f2 | af f2 gefg | af f2 dfed | (3Bcd ef gefg | 
 af f2 bf f2 | af f2 gefg | af f2 dfed | (3Bcd ef gefe |]  