Result

WA

Code [DL]

WITH RECURSIVE m(x,l,r,p) AS (
SELECT 1, '' AS l, v 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 r != ''
)
SELECT l FROM m WHERE l != ''

stdin

00010100
10011001
10100100
11001001
10110010
10000110
11010010
01011011
10010100
01101001
01111000
01011001
01000010
10111110
10001000
00001101
11010010
00000011
10011100
01111110
01001110
00001100
01001100
00001110
00000000
11100101
00011100
00001010
11100111
00100101
10101011
11111101
10100110
00001111
00000001
00101101
00100100
01010101
01110111
00110111
10001111
00111111
11110011
10011001
00000110
01011100
10100001
00010101
10010101
00110010

stdout

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

stderr

strace