Sex offender challenges requirement to confess crime