	byte b(118),c(16)
	character*118 a
	character*1 n(16),m(16)
	character*20 f1
	integer d(16)
	equivalence(a,b)
	data m/'j','U','a','b','c','d','e','f',
     *         'g','h','i','k','m','n','o','p'/
	if(iargc().lt.2)then
	  write(*,*)' order 1.1  out.file (include ?.cat) **2000.7'
	  write(*,*)
	  stop
	endif
	call getarg(1,f1)
	open(1,file=f1,status='old')
	call getarg(2,f1)
	open(3,file=f1,status='unknown')
	read(1,'(a)',end=100)f1

	open(2,file=f1,status='old')
5	read(2,'(a)',end=6)a
	write(3,'(a)')a
	goto 5
6	close(2)

7	read(1,'(a)',end=100)f1
	open(2,file=f1,status='old')
	read(2,'(a)')a
	do 10 i=1,16
	k=i*5+37
10	n(i)=a(k:k)
        do 11 i=1,16
	do 11 j=1,16
11	if(n(i).eq.m(j))c(i)=j	
	write(3,'(a)')'#'//f1
20	read(2,'(a)',end=30)a
	read(a(39:),'(16i5)')d
	do 21 i=39,118
21	b(i)=32
	do 22 i=1,16
	if(d(i).ne.0)then
	  j=c(i)*5+34
	  write(a(j:j+4),'(i5)')d(i)
	endif
22	continue	
	write(3,'(a)')a
	goto 20
30	close(2)
	goto 7
100	close(1)
	close(3)
	end
