Input 1 8 5 2 1 5 2 7 6 4 Expected Output 8 0 0 0 0 0 0 0 0
Note: You can also use F5 to update the logs. This would also retain cursor position while scrolling.