Britney Spears to write autobiography