DECLARE SUB A(n) SUB IF (n MOD 2=0) THEN PRINT "A" END IF IF (n MOD 3 = 1) THEN PRINT "BA" ELSE PRINT "AB" END IF IF (n > 1) THEN A(n-1) END IF END SUB