Compose music following the outlined musical form presented in alphabet characters, along with the provided motif.
X:1
L:1/8
M:3/8
K:G
['A A2 A']  
X:1
L:1/8
M:3/8
K:G
 d | d2 c | B2 A | B>AG | A2 B | c2 c | B2 d | d>cB | A2 z | z2 A | d2 c | B2 A | B>AG | A2 B | 
 c2 c | B2 d | d>cB | A2 z | z2 A | A2 A | A2 A | A2 A | A2 A | B>AG | A>GA | G2 G | G2 |]  