Develop a musical piece using the given theme and incorporating the letter-based structure provided.
X:1
L:1/8
Q:1/8=180
M:4/4
K:G
['AGED DGGF GABd', 'd2 gd edgd']  
X:1
L:1/8
Q:1/8=180
M:4/4
K:G
 DGGF G2 BA | G3 B AGED | DGGF GABd | egdB cABG | DGGF G2 AF | G2 BG AGED | DGGF GABd | 
 gedB c3 ^c || d2 gd edgd | dagd BGB^c | d3 g edef | gedB c2 Bc | d2 gd edgd | dfgd BGBd | 
 c2 cd BcBA | G2 Bd"^last time" efga | g8 |]  