Simulate a digit spinner lock.
There is a row of $D$ spinner wheels, each labeled sequentially with the digits $0$ through $9$, similar to the dial on a briefcase combination lock.
Below the wheels are $B$ buttons, each carrying a label that is $D$ digits long. Pressing a button advances every wheel forward by the digit in the corresponding position of that button's label. A wheel wraps from $9$ back to $0$ (that is, each wheel is taken modulo $10$).
For example, if $D = 4$ and you press the button labeled 1000, only the first wheel advances by one and the others stay put. Pressing the button labeled 1002 advances the first wheel by one and the fourth wheel by two, leaving the two middle wheels unchanged.
Given the starting positions of the wheels and the buttons that are pressed, output the final readout of the wheels after all buttons have been pressed in order.
The first line contains $D$ digits giving the starting positions of the wheels ($1 \le D \le 10$).
Each of the following lines contains the label of the next button pressed, in order; every label is $D$ digits long. Button lines continue until end of input, and there may be no buttons at all.
Output the final readout of the wheels after all buttons have been pressed, as a single line of $D$ digits. Print leading zeros as-is.