finished with ast, but and error in printing: multiple outputs are comming