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

10011101
01011011
01101001
00011100
00100000
00000110
01100110
00101011
10110000
00100100
10011001
10111001
11100100
01111000
10101011
00110101
10001000
11111101
01001001
00000000
10101010
11000001
00000001
10111101
01000111
00010101
10101011
10110110
11001011
01000010
00101101
11010010
11100111
10001101
01111011
00001111
11001000
10101011
11100001
10101000
01001100
01010101
00001010
01001011
00110111
00000011
11110001
10111110
10011111
01001110

stdout

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

stderr

strace