      integer ifrom,ito,icomm,mutptr
      integer nodnum,jcomm
      integer nnod,ncomm,mutnum,mutcap
      real*8 cost,cap,dmnd
      character*10 blank,xname
      data blank/' '     /
      open (unit=3,status='old')
      open (unit=11,file='arcs', status='new')
      nnod = 0
      ncomm= 0
      read(3,1000)xname,ifrom,ito,icomm,cost,cap,mutptr
17500 CONTINUE
      IF (.NOT.(xname .ne.  blank)) GOTO 15000
        write(11,1000)xname,ifrom,ito,icomm,cost,cap,mutptr
        read(3,1000)xname,ifrom,ito,icomm,cost,cap,mutptr
      GOTO 17500
15000 CONTINUE
      open (unit=7,status='old')
      open (unit=12,file='nodes', status='new')
      read(7,1004)nodnum
17501 CONTINUE
         read(7,1002,end=10)nodnum,jcomm,dmnd
         write(12,1002)nodnum,jcomm,dmnd
      GOTO 17501
15001 CONTINUE
   10 continue
      open (unit=4)
      open (unit=13, file='mutual', status='new')
      read(4,1003)mutnum,mutcap
17502 CONTINUE
      IF (.NOT.(mutcap .ne. 0)) GOTO 15002
         write(13,1003)mutnum,mutcap
         read(4,1003)mutnum,mutcap
      GOTO 17502
15002 CONTINUE
      stop
 1000 format(a10,3i5,2f10.2,i5)
 1001 format(2i5)
 1002 format(2i5,f10.0)
 1003 format(i5,f10.0)
 1004 format(i3)
      end
