      program vald2kb
      character*1 comma
      data comma/1H'/
      character*2 elem(99)
      data elem/   2HH , 2HHe,
     1 2HLi, 2HBe, 2HB , 2HC , 2HN , 2HO , 2HF , 2HNe, 2HNa, 2HMg,
     2 2HAl, 2HSi, 2HP , 2HS , 2HCl, 2HAr, 2HK , 2HCa, 2HSc, 2HTi,
     3 2HV , 2HCr, 2HMn, 2HFe, 2HCo, 2HNi, 2HCu, 2HZn, 2HGa, 2HGe,
     4 2HAs, 2HSe, 2HBr, 2HKr, 2HRb, 2HSr, 2HY , 2HZr, 2HNb, 2HMo,
     5 2HTc, 2HRu, 2HRh, 2HPd, 2HAg, 2HCd, 2HIn, 2HSn, 2HSb, 2HTe,
     6 2HI , 2HXe, 2HCs, 2HBa, 2HLa, 2HCe, 2HPr, 2HNd, 2HPm, 2HSm,
     7 2HEu, 2HGd, 2HTb, 2HDy, 2HHo, 2HEr, 2HTm, 2HYb, 2HLu, 2HHf,
     8 2HTa, 2HW , 2HRe, 2HOs, 2HIr, 2HPt, 2HAu, 2HHg, 2HTl, 2HPb,
     9 2HBi, 2HPo, 2HAt, 2HRn, 2HFr, 2HRa, 2HAc, 2HTh, 2HPa, 2HU ,
     T 2HNp, 2HPu, 2HAm, 2HCm, 2HBk, 2HCf, 2HEs/
      character*255 line
      character*4 labcode
      real*8 wla
    1 read(*,'(a)',end=999) line
      do i=1,255
      if(line(i:i).ne.' ') exit
      end do
      if(line(i:i).ne.comma) go to 1
      read(line, *) labcode,wla,chi,gflog,gammar,gammas,gammaw
      do m=1,99
      if(labcode(1:2).eq.elem(m)) go to 77
      end do
      write(*,*) 'I do not understand ',labcode
      stop
   77 read(labcode(3:4),*) ionp1
      code=(m*100+(ionp1-1))/100.
      write(*,100) code,wla,chi,gflog,gammar,gammas,gammaw
  100 format(f9.2,f10.3,f8.3,f8.3,3f7.2)
      go to 1
  999 stop
      end


