c +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      subroutine writo(nec,nnt,nnp,norb)
      include 'dens.prm'
      character*1 mes,menys,spint(necz),spinp(necz)
      integer*2 nec,nnt(necz),nnp(necz),ntw(necz),npw(necz)
      data mes/'+'/
      data menys/'-'/
 992  format(20i4)
 993  format(20(i4,a1))
      if(nec.eq.0) write(6,*)' ---- fonamental ---- '
      if(nec.eq.0) return
c      write(6,992) (nnt(i),i=1,nec),(nnp(i),i=1,nec)
      do i=1,nec
	 ntw(i)=nnt(i)
	 spint(i)=mes
	 if(nnt(i).gt.norb)ntw(i)=nnt(i)-norb
	 if(nnt(i).gt.norb)spint(i)=menys
	 npw(i)=nnp(i)
	 spinp(i)=mes
	 if(nnp(i).gt.norb)npw(i)=nnp(i)-norb
	 if(nnp(i).gt.norb)spinp(i)=menys
      enddo
      write(6,993)(ntw(i),spint(i),i=1,nec),(npw(i),spinp(i),i=1,nec)
      return
      end
