#!/bin/bash

sed -e 's/(Inf)//' -e 's/(-Inf)//' -e 's/^.*.=.(//' -e 's/(//g' -e s:\'.*.$:: -e 's/)/ /g' -e s/[\"\']//g tt  > ttt


n=`wc -w ttt | awk ' { print $1 } '`
i=0
cont=""
while [ $i -lt $n ] ; do
   (( i = $i + 1 ))
   sub=`cut -d" " -f$i ttt`
   if [ "`echo $sub | grep , `" = "" ] ; then
      cont="$cont $sub"
   else
      ci=`echo $sub | cut -d, -f1`
      cf=`echo $sub | cut -d, -f2`
      dc=`echo $sub | cut -d, -f3`
      c=$ci
      cont="$cont $c"
      diff="-"
      while [ "$diff" = "-" ] ; do
         c=`echo $c $dc | awk ' { print $1 + $2 } '`
         cont="$cont $c"
         diff=`echo $c $cf | awk ' { print $1 - $2 } ' | cut -c1`
      done
   fi
done
echo $cont
