A man suffering from cancer writes touching notes to his daughter