I have this input

```
"012345"
5
```

By hand, I drew this:

```
0
1 5
2
3
4
```

and the result *should* be

```
015234
```

but the expected value came back as

```
012354
```

I think, what was drawn was:

```
0
1
2
3 5
4
```

Can anyone help me understand why 5 is next to 3 and not next to 1?

Thanks.