      program cathssmn
C month-season of B-HSS events
      CHARACTER*128 infhss,outfile
	dimension ires(12)
   29 format(1X,F8.3,1X,I3,1X,I2)
   30 format(1X,I2,1X,I3)
      	infhss='cathss48bkp.txt' ! 742 B+HSS events kp<3
	outfile='cathssmn.res'
	open(10,file=infhss,action='READ')
	open(11,file=outfile)
	nn=0
	do i=1,12
	ires(i)=0
	enddo
C
	DO k=1,742
	read(10,29,end=27) ryear,ldabt,imnbt
	nn=nn+1
	do imn=1,12
	if (imnbt.eq.imn) then
	ires(imn)=ires(imn)+1
	exit
	endif
	enddo
	ENDDO
   27 close(unit=10)
	do i=1,12
	write(*,30) i,ires(i)
      write(11,30) i,ires(i)
	enddo
	close(unit=11)
	pause ' '
	STOP
	END