An third homework of course Formal Grammar