Substitution parsing

figure this out yourself?