Either a D or a JK flip flop can easily do the job. If using a D flip flop, simply connect the output of a given stage to the D input of the next stage. If using the JK type flip flop, connect the K input to the complement of the J INPUT. The J input now acts the same as the D input to a D flip flop. Proceed as if using a D flip flop. Another way of using a JK is to connect the Q output of a given stage to the J input of the next stage. Connect the Qbar output of a given stage to the K input of the next stage.