      IMPLICIT REAL*8(A-H,O-Z)
      INTEGER JB(2,3),KA(2,10),KS(11,10)
      REAL*8 VA(3,50)
      READ(1,*)
      READ(1,*) IL,NGEN,INV
      CALL TSPACE(IL)
      DO 1 I=1,NGEN
      READ(1,*) JA,JB
      CALL TSGENR(JA,JB)
    1 CONTINUE
      CALL TSPGRP(INV)
      CALL TSPGDS
      READ(1,*) A,B,C
      READ(1,*) CA,CB,CC
      CALL TSLATC(A,B,C,CA,CB,CC)
      READ(1,*) NA,NKA
      READ(1,*) ((KA(J,I),J=1,2),I=1,NKA)
      NN=7
      IF(IL.LE.0) NN=11
      DO 2 I=1,NKA
      DO 21 J=1,NN
      IF(J.NE.1) KS(J,I)=0
      IF(J.EQ.1) KS(J,I)=1
   21 CONTINUE
    2 CONTINUE
      DO 3 I=1,NA
    3 READ(1,*) (VA(J,I),J=1,3)
      CALL TSCRST(VA,KA,NKA,NA,KS)
      JF=6
      READ(1,*) RM
      CALL TSNBTB(RM,JF)
      pause
      STOP
      END
