Result

AC

Code [DL]

WITH RECURSIVE m(x,l,r,p)AS(SELECT 1,'' AS l,substr(v,10) AS r,substr(v,1,8) AS p FROM i UNION ALL SELECT x + 1,CASE WHEN p='00000000' or p='00000001' or p='00000011' or p='00000110' or p='00001010' or p='00001111' or p='00010101' or p='00011100' or p='00100100' or p='00101101' or p='00110111' or p='01000010' or p='01001110' or p='01011011' or p='01101001' or p='01111000' or p='10001000' or p='10011001' or p='10101011' or p='10111110' or p='11010010' or p='11100111' or p='11111101' THEN 1 ELSE 0 END AS l,substr(r,10) AS r,substr(r,1,8) AS p FROM m WHERE p != '')SELECT l FROM m WHERE l!=''

stdin

00011101
10101011
00000110
01100010
10110000
11100111
11000010
01111000
00101110
10001000
10011001
01011100
00101000
00110111
11110010
01001110
11011001
00001010
01101011
11111000
00011010
01000010
00111110
00011100
00000011
01001111
10110100
00000000
01000000
01011001
10110011
00000110
11010010
00000001
01011011
00110001
00010101
00001111
01011000
10010000
10100000
00101101
11111101
00011011
10111110
00100100
01111100
01101001
00000011
10010111

stdout

0
1
1
0
0
1
0
1
0
1
1
0
0
1
0
1
0
1
0
0
0
1
0
1
1
0
0
1
0
0
0
1
1
1
1
0
1
1
0
0
0
1
1
0
1
1
0
1
1
0

stderr

strace