Structural and functional analysis of bacterial flavin-containing monooxygenase reveals its ping-pong-type reaction mechanism.