I have tried several different solutions but all seem to fail and this is the closest I can get. But it will print at the end one line of nothing and that is the reason it fails