INCREASE Y INCREASE Y INCREASE Y INCREASE Y INCREASE Y #INCREASE X #INCREASE X #INCREASE X #INCREASE X #INCREASE X #INCREASE X #INCREASE X INCREASE B REPEAT Y TIMES ( REPEAT Y TIMES ( REPEAT Y TIMES ( INCREASE O ) ) ) REPEAT Y TIMES ( REPEAT Y TIMES ( INCREASE O ) ) REPEAT Y TIMES ( REPEAT Y TIMES ( INCREASE O ) ) PRINT X REPEAT O TIMES ( REPEAT B TIMES ( CLEAR P CLEAR Q INCREASE Q REPEAT X TIMES ( REPEAT P TIMES ( CLEAR Q ) CLEAR P INCREASE P ) REPEAT Q TIMES ( CLEAR P ) ) REPEAT P TIMES ( CLEAR N CLEAR M CLEAR B CLEAR C CLEAR A CLEAR D CLEAR C REPEAT X TIMES ( INCREASE B REPEAT A TIMES ( CLEAR A CLEAR B INCREASE C REPEAT D TIMES ( CLEAR D CLEAR C ) REPEAT C TIMES ( INCREASE M INCREASE D ) ) REPEAT B TIMES ( INCREASE N INCREASE A ) ) CLEAR B INCREASE B REPEAT A TIMES ( CLEAR B ) REPEAT B TIMES ( CLEAR X PRINT N CLEAR C INCREASE C REPEAT D TIMES ( CLEAR C ) REPEAT C TIMES ( REPEAT M TIMES ( INCREASE X ) PRINT X ) REPEAT D TIMES ( REPEAT N TIMES ( INCREASE X ) CLEAR P CLEAR S INCREASE S REPEAT X TIMES ( REPEAT P TIMES ( CLEAR S ) CLEAR P INCREASE P ) REPEAT S TIMES ( CLEAR P ) REPEAT P TIMES ( CLEAR Y REPEAT M TIMES ( INCREASE X ) REPEAT X TIMES ( INCREASE Y ) REPEAT X TIMES ( INCREASE Y ) PRINT Y PRINT X ) ) ) #3x+1 REPEAT A TIMES ( CLEAR Y REPEAT N TIMES ( INCREASE X ) REPEAT X TIMES ( INCREASE Y ) REPEAT X TIMES ( INCREASE Y ) PRINT Y PRINT X ) ) )