and both inclusive. The order of the beads follow a pattern:

Starting from two single digit numbers, add them together add a bead labelled with the ones digit of the sum. Repeat this process using the last two beads until you arrive at the original first two numbers.

Given the starting numbers for several necklaces, print the pattern on each.

#### Input

The first line represents the number of necklaces has.

The next lines each contain two space separated single digit integers representing the starting two numbers.

#### Output

For each necklace, print *on a new line* the pattern of beads on it with each digit separated by a space.

#### Sample Input

```
2
1 8
3 4
```

#### Sample Output

```
1 8 9 7 6 3 9 2 1 3 4 7 1 8
3 4 7 1 8 9 7 6 3 9 2 1 3 4
```

## Comments

David, there are some problems with this question. My fellow peers do not know why their code doesn't work, and I cannot find the issue either. Could you please look into this for my buddies? Thanks.

Make sure each sequence is on a new line, I've added that clarification to the problem description. For anything else, use the editorial I've just added as a reference if you are stuck.

In regards to http://tssoj.me/submission/8976 check output for

`5 5`

. Let me know if there's another submission you want looked at.