subroutine chkhist(mrsym,nmax,ipk)
integer mrsym(63)
integer hist(0:63)
do i=0,63
hist(i)=0
enddo
do j=1,63
i=mrsym(j)
hist(i)=hist(i)+1
nmax=0
if(hist(i).gt.nmax) then
nmax=hist(i)
ipk=i+1
endif
return
end subroutine chkhist