Hide and Seek 4

Find the shortest time from N to K using moves -1, +1, and 2X, then output the lexicographically smallest shortest path.

Medium6BFSGraphShortest pathNo attempts yetTime limit2sMemory limit512 MB

Problem

Subin plays hide and seek with his younger sibling. Subin is at point NN and the sibling is at point KK. Subin can walk or teleport. If Subin is at XX and walks, one second later he is at X1X-1 or X+1X+1. If he teleports, one second later he is at 2X2X. Subin's position is never negative. The sibling never moves.

Given both positions, find the shortest time in which Subin reaches his sibling, together with the positions he passes through.

Several routes can take that shortest time. In that case pick the one whose sequence of visited positions is smallest in lexicographic order. All shortest routes have the same length, so compare two sequences from the front: the one with the smaller number at the first position where they differ comes first.

Input

The first line contains Subin's position NN and the sibling's position KK, separated by a space. (0N1000000 \le N \le 100000, 0K1000000 \le K \le 100000)

Output

On the first line, print the shortest time in seconds.

On the second line, print the positions Subin passes through in order, from NN to KK, separated by single spaces. If several routes take the shortest time, print only the sequence that is smallest in lexicographic order.