      program readgen

      character cline * 80
      dimension x(200)
      dimension cp(200)

      do n = 1, 6
        read(*,'(a80)') cline
      enddo

      read (*,*) nd

      xmin = 1000.0
      xmax = 0.0

      do n = 1, nd
        read(*,*) x(n), cp(n)
        if ( x(n) .lt. xmin )  xmin = x(n)
        if ( x(n) .gt. xmax )  xmax = x(n)
      enddo

      nf = nd

      read(*,'(a80)') cline
      read(*,*) nd

      do n = 1, nd
        nx = nf + n
        read(*,*) x(nx), cp(nx)
        if ( x(nx) .lt. xmin )  xmin = x(nx)
        if ( x(nx) .gt. xmax )  xmax = x(nx)
      enddo

      chord = xmax - xmin

      open ( unit=11, file='cp.do' )

      do n = 1, nx
        x(n) = ( x(n) - xmin ) / chord
        write(11,*) x(n), cp(n)
      enddo

      stop
      end
