      parameter (MDT=2300,MFQ=17)

      implicit real*8(a-h,o-z)
      dimension a(MDT,MFQ),a1(MDT)
      character INFILE*100,OTFILE*100

      write(*,*)'Enter Input File Name'
      read(*,*)INFILE
      write(*,*)'Enter Output File Name'
      read(*,*)OTFILE

      open(10,file=INFILE,status='old')
      open(20,file=OTFILE)

      i=1
1     read(10,*,end=2)(a(i,j),j=1,MFQ)
      i=i+1
      goto 1
2     close(10)
      N=i-1


      do 3 m=1,MFQ
         do 3 l=1,N
3           a1(l)=a(l,m)

      do 100 k=1,MFQ
         do 200 l=1,N
            write(20,1000)a(l,k)
200      continue
100   continue
      close(20)

1000  format(1f8.4)
      stop
      end
