Compose a piece of music based on the provided motif and adhering to the outlined musical structure.
X:1
L:1/4
M:3/4
K:G
['d d', 'b a'  
X:1
L:1/4
M:3/4
K:G
 B/>c/ | d d e/d/ | d d (3d/c/B/ | B =f e | =f d (3d/c/B/ | c c d/B/ | c c B/c/ | 
 d/>e/=f/>e/ d/c/ | B/A/ G || G | B d d | b a a |{g} b b a | !fermata!g e/d/ d | d/e/d/c/ B | 
 =f d c | B B A | G G ||  