from copy import copy
l = ['0000101001100111000111011', '0000110100011010011110100', '0000110100011110011010100', '0000110100011110011110100', '0000111000011010011010000', '0000111000011010011010100', '0000111000011010111010100', '0000111100011010111010100', '0000111100011110011010100', '0001010000011010101010100', '0001010000011010111000100', '0001010000011010111010100', '0001010000111010011010100', '0001010000111110011110100', '0001010000111110111010100', '0001010100011000111010100', '0001010100011010011010100', '0001010100011010101010100', '0001010100011010111010100', '0001010100011010111100100', '0001010100011010111110100', '0001010100011110111010100', '0001010100111110011010100', '0001010100111110111110100', '0001110000001010111010100', '0001110000011010011010000', '0001110000011010011010100', '0001110000011010011110100', '0001110000011010101010100', '0001110000011010111000100', '0001110000011010111010100', '0001110000011010111010110', '0001110000011010111100100', '0001110000011010111110100', '0001110000011110011010100', '0001110000011110111010100', '0001110000111010111010100', '0001110000111110011010000', '0001110000111110011010100', '0001110000111110011110100', '0001110000111110111010100', '0001110000111110111110100', '0001110001010010111010100', '0001110010011010111000100', '0001110100001010101010100', '0001110100001010111010110', '0001110100011010011010000', '0001110100011010011010100', '0001110100011010011110100', '0001110100011010101010100', '0001110100011010111010100', '0001110100011010111010110', '0001110100011010111110100', '0001110100011110011010000', '0001110100011110011010100', '0001110100011110011110000', '0001110100011110011110100', '0001110100011110111010100', '0001110100011110111110100', '0001110100111010011010100', '0001110100111010111010100', '0001110100111110011110100', '0001110100111110111010100', '0001110101010010111010100', '0001111000010010011010100', '0001111000011010010010100', '0001111000011010011010100', '0001111000011010011110100', '0001111000011011011010100', '0001111001011010011010100', '0001111100010010111010100', '0001111100011010011110100', '0001111100011010111010100', '0001111100011110011010100', '0001111101011010111010100', '0011000010001000101000100', '0011000010001000101000110', '0011000010001000101010100', '0011000010001100101000110', '0011000010001100101100110', '0011000010101000101000010', '0011000110001000101000110', '0011000110001000101010100', '0011000110001000101100110', '0011000110001100101000110', '0011000110001100101010100', '0011000110001100101100110', '0011000110101100101000110', '0011000110101100101100110', '0011100010001000101000110', '0011100110001000101000110', '0011100110001000101010100', '0011100110001100101100110', '0100001101000111100111111', '0100010100011010111110000', '0100010100011010111110100', '0100010100111110111110000', '0100011100011010111010100', '0100011100111110111110000', '0100011101111110111110000', '0101000100001010101010111', '0101010000011010101010110', '0101010000011010111000110', '0101010000011010111010100', '0101010000011010111110100', '0101010000011110111010100', '0101010000011110111110100', '0101010000111010111010100', '0101010000111010111110000', '0101010000111010111110100', '0101010000111110011110100', '0101010000111110111010100', '0101010100001000101010110', '0101010100001010101010110', '0101010100001010111010100', '0101010100001010111010110', '0101010100001110111110110', '0101010100011010011010000', '0101010100011010011010100', '0101010100011010011110100', '0101010100011010101010100', '0101010100011010101010110', '0101010100011010111000110', '0101010100011010111010000', '0101010100011010111010100', '0101010100011010111010110', '0101010100011010111110000', '0101010100011010111110100', '0101010100011110011110100', '0101010100011110111110100', '0101010100011110111110110', '0101010100111010011010100', '0101010100111010111010100', '0101010100111110011010100', '0101010100111110011110100', '0101010100111110111010100', '0101010100111110111110000', '0101010100111110111110100', '0101010101010010111010100', '0101011100000010111011111', '0101011100010010111010100', '0101011100011010111010100', '0101011100011010111110100', '0101011101011010111010100', '0101011101111110111110000', '0101110000011010111010100', '0101110000011010111110100', '0101110100011010111010100', '0101110100011010111110100', '0101110100011110111110100', '0110100110001100001100110', '0111000110001000101000110', '0111000110001000101010110', '0111000110001010101010110', '0111000110001100101100110', '0111000110101100001100110', '0111100010001000001100110', '0111100010001000101000110', '0111100010001100101100110', '0111100110001000001100110', '0111100110001000101000100', '0111100110001000101000110', '0111100110001100001100110', '0111100110001100101000110', '0111100110001100101100110', '0111101010001000001100110']

N1 = 222

def L1(starting_bits, bit_len):
    '''L1 generator
       Generates sequence of degree 25 and len == bit_len using polynom (x**25 ^ x**3 ^ 1)'''
    x = copy(starting_bits)
    #print(starting_bits)
    for i in range(0, bit_len-25):
        x += str(int(x[i]) ^ int(x[i+3]))
    return x

zi = '00010101000010100010101001111111111011001101010001101110101010000001010111101001110001100111000001000011100010111101010100000101011110101010111100001100000110111011000000000111011101011011000000011110001000110011100001000110001000000000011011000101111011000001110011100011011011111110111110101100000100110101100001001101001100011000011110101010011000101000010011101001000110011011000010100000101100100000100110100011111001100100001110110001001001001011110111010011110111010101010101000111100000000001111010001000010001000100010100100101001000111010001000100100001011010010000111111001001100100001111010001001100000011101001001000110111000010110111111011010011101010010100100001111111111101110010000110000010011111100001011111001010001011011100011100010110011100101101101111100011110101101001011010110111001101010000010100110001111111100110010100110110001011011001100101100101000101010001101101100111001100101110000011000111101111111001100110110111101100101010101011100011001000010111010100010101100010111110111110001000110001110100101110111010000111110011000110010010011011111111011111111011011101101001000000000001011111010101011101010010010001010110011100101010011100101010001111000010001100111100111110111101101101111001000010101001101100001010100011100100001111000110100111000011101011101011001100001110011111010000010010111111010001110001011010100011110000011100100111001100001001111111111001001000110001000111110010011101111001010000010000111011101101011101001000110011000010011010100111100011101000100101011101001011000110010110000111100110011010011110011100101100101101100100101110101010010001010101101011101011100100100110000011010110111100001111101101110011100010101011110111010110101011101110100110011101110000010101000110110111101100010111100001011101101111010111001100110010100000110011101111111000101111110010001011011010001001011000110000000100100101011010110110010001110110011100010101111001101110010010100010001110001110000110010000101111110110011111111001100101000000001110110011010100111001100010101011111000010111000010101101111'

def analyze_stats(lst, N1):
    stat = {}
    z = zi[:N1]
    for l in lst:
        x = L1(l, N1)
        R = sum(int(x[d]) ^ int(z[d]) for d in range(N1))
        stat[l] = R
    return stat

print(analyze_stats(l, N1))


0af34b3ee3d5f8fe90cf039fd1a96980270429c5
<mask token>


def L1(starting_bits, bit_len):
    """L1 generator
       Generates sequence of degree 25 and len == bit_len using polynom (x**25 ^ x**3 ^ 1)"""
    x = copy(starting_bits)
    for i in range(0, bit_len - 25):
        x += str(int(x[i]) ^ int(x[i + 3]))
    return x


<mask token>


def analyze_stats(lst, N1):
    stat = {}
    z = zi[:N1]
    for l in lst:
        x = L1(l, N1)
        R = sum(int(x[d]) ^ int(z[d]) for d in range(N1))
        stat[l] = R
    return stat


<mask token>

<mask token>


def L1(starting_bits, bit_len):
    """L1 generator
       Generates sequence of degree 25 and len == bit_len using polynom (x**25 ^ x**3 ^ 1)"""
    x = copy(starting_bits)
    for i in range(0, bit_len - 25):
        x += str(int(x[i]) ^ int(x[i + 3]))
    return x


<mask token>


def analyze_stats(lst, N1):
    stat = {}
    z = zi[:N1]
    for l in lst:
        x = L1(l, N1)
        R = sum(int(x[d]) ^ int(z[d]) for d in range(N1))
        stat[l] = R
    return stat


print(analyze_stats(l, N1))

<mask token>
l = ['0000101001100111000111011', '0000110100011010011110100',
    '0000110100011110011010100', '0000110100011110011110100',
    '0000111000011010011010000', '0000111000011010011010100',
    '0000111000011010111010100', '0000111100011010111010100',
    '0000111100011110011010100', '0001010000011010101010100',
    '0001010000011010111000100', '0001010000011010111010100',
    '0001010000111010011010100', '0001010000111110011110100',
    '0001010000111110111010100', '0001010100011000111010100',
    '0001010100011010011010100', '0001010100011010101010100',
    '0001010100011010111010100', '0001010100011010111100100',
    '0001010100011010111110100', '0001010100011110111010100',
    '0001010100111110011010100', '0001010100111110111110100',
    '0001110000001010111010100', '0001110000011010011010000',
    '0001110000011010011010100', '0001110000011010011110100',
    '0001110000011010101010100', '0001110000011010111000100',
    '0001110000011010111010100', '0001110000011010111010110',
    '0001110000011010111100100', '0001110000011010111110100',
    '0001110000011110011010100', '0001110000011110111010100',
    '0001110000111010111010100', '0001110000111110011010000',
    '0001110000111110011010100', '0001110000111110011110100',
    '0001110000111110111010100', '0001110000111110111110100',
    '0001110001010010111010100', '0001110010011010111000100',
    '0001110100001010101010100', '0001110100001010111010110',
    '0001110100011010011010000', '0001110100011010011010100',
    '0001110100011010011110100', '0001110100011010101010100',
    '0001110100011010111010100', '0001110100011010111010110',
    '0001110100011010111110100', '0001110100011110011010000',
    '0001110100011110011010100', '0001110100011110011110000',
    '0001110100011110011110100', '0001110100011110111010100',
    '0001110100011110111110100', '0001110100111010011010100',
    '0001110100111010111010100', '0001110100111110011110100',
    '0001110100111110111010100', '0001110101010010111010100',
    '0001111000010010011010100', '0001111000011010010010100',
    '0001111000011010011010100', '0001111000011010011110100',
    '0001111000011011011010100', '0001111001011010011010100',
    '0001111100010010111010100', '0001111100011010011110100',
    '0001111100011010111010100', '0001111100011110011010100',
    '0001111101011010111010100', '0011000010001000101000100',
    '0011000010001000101000110', '0011000010001000101010100',
    '0011000010001100101000110', '0011000010001100101100110',
    '0011000010101000101000010', '0011000110001000101000110',
    '0011000110001000101010100', '0011000110001000101100110',
    '0011000110001100101000110', '0011000110001100101010100',
    '0011000110001100101100110', '0011000110101100101000110',
    '0011000110101100101100110', '0011100010001000101000110',
    '0011100110001000101000110', '0011100110001000101010100',
    '0011100110001100101100110', '0100001101000111100111111',
    '0100010100011010111110000', '0100010100011010111110100',
    '0100010100111110111110000', '0100011100011010111010100',
    '0100011100111110111110000', '0100011101111110111110000',
    '0101000100001010101010111', '0101010000011010101010110',
    '0101010000011010111000110', '0101010000011010111010100',
    '0101010000011010111110100', '0101010000011110111010100',
    '0101010000011110111110100', '0101010000111010111010100',
    '0101010000111010111110000', '0101010000111010111110100',
    '0101010000111110011110100', '0101010000111110111010100',
    '0101010100001000101010110', '0101010100001010101010110',
    '0101010100001010111010100', '0101010100001010111010110',
    '0101010100001110111110110', '0101010100011010011010000',
    '0101010100011010011010100', '0101010100011010011110100',
    '0101010100011010101010100', '0101010100011010101010110',
    '0101010100011010111000110', '0101010100011010111010000',
    '0101010100011010111010100', '0101010100011010111010110',
    '0101010100011010111110000', '0101010100011010111110100',
    '0101010100011110011110100', '0101010100011110111110100',
    '0101010100011110111110110', '0101010100111010011010100',
    '0101010100111010111010100', '0101010100111110011010100',
    '0101010100111110011110100', '0101010100111110111010100',
    '0101010100111110111110000', '0101010100111110111110100',
    '0101010101010010111010100', '0101011100000010111011111',
    '0101011100010010111010100', '0101011100011010111010100',
    '0101011100011010111110100', '0101011101011010111010100',
    '0101011101111110111110000', '0101110000011010111010100',
    '0101110000011010111110100', '0101110100011010111010100',
    '0101110100011010111110100', '0101110100011110111110100',
    '0110100110001100001100110', '0111000110001000101000110',
    '0111000110001000101010110', '0111000110001010101010110',
    '0111000110001100101100110', '0111000110101100001100110',
    '0111100010001000001100110', '0111100010001000101000110',
    '0111100010001100101100110', '0111100110001000001100110',
    '0111100110001000101000100', '0111100110001000101000110',
    '0111100110001100001100110', '0111100110001100101000110',
    '0111100110001100101100110', '0111101010001000001100110']
N1 = 222


def L1(starting_bits, bit_len):
    """L1 generator
       Generates sequence of degree 25 and len == bit_len using polynom (x**25 ^ x**3 ^ 1)"""
    x = copy(starting_bits)
    for i in range(0, bit_len - 25):
        x += str(int(x[i]) ^ int(x[i + 3]))
    return x


zi = (
    '00010101000010100010101001111111111011001101010001101110101010000001010111101001110001100111000001000011100010111101010100000101011110101010111100001100000110111011000000000111011101011011000000011110001000110011100001000110001000000000011011000101111011000001110011100011011011111110111110101100000100110101100001001101001100011000011110101010011000101000010011101001000110011011000010100000101100100000100110100011111001100100001110110001001001001011110111010011110111010101010101000111100000000001111010001000010001000100010100100101001000111010001000100100001011010010000111111001001100100001111010001001100000011101001001000110111000010110111111011010011101010010100100001111111111101110010000110000010011111100001011111001010001011011100011100010110011100101101101111100011110101101001011010110111001101010000010100110001111111100110010100110110001011011001100101100101000101010001101101100111001100101110000011000111101111111001100110110111101100101010101011100011001000010111010100010101100010111110111110001000110001110100101110111010000111110011000110010010011011111111011111111011011101101001000000000001011111010101011101010010010001010110011100101010011100101010001111000010001100111100111110111101101101111001000010101001101100001010100011100100001111000110100111000011101011101011001100001110011111010000010010111111010001110001011010100011110000011100100111001100001001111111111001001000110001000111110010011101111001010000010000111011101101011101001000110011000010011010100111100011101000100101011101001011000110010110000111100110011010011110011100101100101101100100101110101010010001010101101011101011100100100110000011010110111100001111101101110011100010101011110111010110101011101110100110011101110000010101000110110111101100010111100001011101101111010111001100110010100000110011101111111000101111110010001011011010001001011000110000000100100101011010110110010001110110011100010101111001101110010010100010001110001110000110010000101111110110011111111001100101000000001110110011010100111001100010101011111000010111000010101101111'
    )


def analyze_stats(lst, N1):
    stat = {}
    z = zi[:N1]
    for l in lst:
        x = L1(l, N1)
        R = sum(int(x[d]) ^ int(z[d]) for d in range(N1))
        stat[l] = R
    return stat


print(analyze_stats(l, N1))

from copy import copy
l = ['0000101001100111000111011', '0000110100011010011110100',
    '0000110100011110011010100', '0000110100011110011110100',
    '0000111000011010011010000', '0000111000011010011010100',
    '0000111000011010111010100', '0000111100011010111010100',
    '0000111100011110011010100', '0001010000011010101010100',
    '0001010000011010111000100', '0001010000011010111010100',
    '0001010000111010011010100', '0001010000111110011110100',
    '0001010000111110111010100', '0001010100011000111010100',
    '0001010100011010011010100', '0001010100011010101010100',
    '0001010100011010111010100', '0001010100011010111100100',
    '0001010100011010111110100', '0001010100011110111010100',
    '0001010100111110011010100', '0001010100111110111110100',
    '0001110000001010111010100', '0001110000011010011010000',
    '0001110000011010011010100', '0001110000011010011110100',
    '0001110000011010101010100', '0001110000011010111000100',
    '0001110000011010111010100', '0001110000011010111010110',
    '0001110000011010111100100', '0001110000011010111110100',
    '0001110000011110011010100', '0001110000011110111010100',
    '0001110000111010111010100', '0001110000111110011010000',
    '0001110000111110011010100', '0001110000111110011110100',
    '0001110000111110111010100', '0001110000111110111110100',
    '0001110001010010111010100', '0001110010011010111000100',
    '0001110100001010101010100', '0001110100001010111010110',
    '0001110100011010011010000', '0001110100011010011010100',
    '0001110100011010011110100', '0001110100011010101010100',
    '0001110100011010111010100', '0001110100011010111010110',
    '0001110100011010111110100', '0001110100011110011010000',
    '0001110100011110011010100', '0001110100011110011110000',
    '0001110100011110011110100', '0001110100011110111010100',
    '0001110100011110111110100', '0001110100111010011010100',
    '0001110100111010111010100', '0001110100111110011110100',
    '0001110100111110111010100', '0001110101010010111010100',
    '0001111000010010011010100', '0001111000011010010010100',
    '0001111000011010011010100', '0001111000011010011110100',
    '0001111000011011011010100', '0001111001011010011010100',
    '0001111100010010111010100', '0001111100011010011110100',
    '0001111100011010111010100', '0001111100011110011010100',
    '0001111101011010111010100', '0011000010001000101000100',
    '0011000010001000101000110', '0011000010001000101010100',
    '0011000010001100101000110', '0011000010001100101100110',
    '0011000010101000101000010', '0011000110001000101000110',
    '0011000110001000101010100', '0011000110001000101100110',
    '0011000110001100101000110', '0011000110001100101010100',
    '0011000110001100101100110', '0011000110101100101000110',
    '0011000110101100101100110', '0011100010001000101000110',
    '0011100110001000101000110', '0011100110001000101010100',
    '0011100110001100101100110', '0100001101000111100111111',
    '0100010100011010111110000', '0100010100011010111110100',
    '0100010100111110111110000', '0100011100011010111010100',
    '0100011100111110111110000', '0100011101111110111110000',
    '0101000100001010101010111', '0101010000011010101010110',
    '0101010000011010111000110', '0101010000011010111010100',
    '0101010000011010111110100', '0101010000011110111010100',
    '0101010000011110111110100', '0101010000111010111010100',
    '0101010000111010111110000', '0101010000111010111110100',
    '0101010000111110011110100', '0101010000111110111010100',
    '0101010100001000101010110', '0101010100001010101010110',
    '0101010100001010111010100', '0101010100001010111010110',
    '0101010100001110111110110', '0101010100011010011010000',
    '0101010100011010011010100', '0101010100011010011110100',
    '0101010100011010101010100', '0101010100011010101010110',
    '0101010100011010111000110', '0101010100011010111010000',
    '0101010100011010111010100', '0101010100011010111010110',
    '0101010100011010111110000', '0101010100011010111110100',
    '0101010100011110011110100', '0101010100011110111110100',
    '0101010100011110111110110', '0101010100111010011010100',
    '0101010100111010111010100', '0101010100111110011010100',
    '0101010100111110011110100', '0101010100111110111010100',
    '0101010100111110111110000', '0101010100111110111110100',
    '0101010101010010111010100', '0101011100000010111011111',
    '0101011100010010111010100', '0101011100011010111010100',
    '0101011100011010111110100', '0101011101011010111010100',
    '0101011101111110111110000', '0101110000011010111010100',
    '0101110000011010111110100', '0101110100011010111010100',
    '0101110100011010111110100', '0101110100011110111110100',
    '0110100110001100001100110', '0111000110001000101000110',
    '0111000110001000101010110', '0111000110001010101010110',
    '0111000110001100101100110', '0111000110101100001100110',
    '0111100010001000001100110', '0111100010001000101000110',
    '0111100010001100101100110', '0111100110001000001100110',
    '0111100110001000101000100', '0111100110001000101000110',
    '0111100110001100001100110', '0111100110001100101000110',
    '0111100110001100101100110', '0111101010001000001100110']
N1 = 222


def L1(starting_bits, bit_len):
    """L1 generator
       Generates sequence of degree 25 and len == bit_len using polynom (x**25 ^ x**3 ^ 1)"""
    x = copy(starting_bits)
    for i in range(0, bit_len - 25):
        x += str(int(x[i]) ^ int(x[i + 3]))
    return x


zi = (
    '00010101000010100010101001111111111011001101010001101110101010000001010111101001110001100111000001000011100010111101010100000101011110101010111100001100000110111011000000000111011101011011000000011110001000110011100001000110001000000000011011000101111011000001110011100011011011111110111110101100000100110101100001001101001100011000011110101010011000101000010011101001000110011011000010100000101100100000100110100011111001100100001110110001001001001011110111010011110111010101010101000111100000000001111010001000010001000100010100100101001000111010001000100100001011010010000111111001001100100001111010001001100000011101001001000110111000010110111111011010011101010010100100001111111111101110010000110000010011111100001011111001010001011011100011100010110011100101101101111100011110101101001011010110111001101010000010100110001111111100110010100110110001011011001100101100101000101010001101101100111001100101110000011000111101111111001100110110111101100101010101011100011001000010111010100010101100010111110111110001000110001110100101110111010000111110011000110010010011011111111011111111011011101101001000000000001011111010101011101010010010001010110011100101010011100101010001111000010001100111100111110111101101101111001000010101001101100001010100011100100001111000110100111000011101011101011001100001110011111010000010010111111010001110001011010100011110000011100100111001100001001111111111001001000110001000111110010011101111001010000010000111011101101011101001000110011000010011010100111100011101000100101011101001011000110010110000111100110011010011110011100101100101101100100101110101010010001010101101011101011100100100110000011010110111100001111101101110011100010101011110111010110101011101110100110011101110000010101000110110111101100010111100001011101101111010111001100110010100000110011101111111000101111110010001011011010001001011000110000000100100101011010110110010001110110011100010101111001101110010010100010001110001110000110010000101111110110011111111001100101000000001110110011010100111001100010101011111000010111000010101101111'
    )


def analyze_stats(lst, N1):
    stat = {}
    z = zi[:N1]
    for l in lst:
        x = L1(l, N1)
        R = sum(int(x[d]) ^ int(z[d]) for d in range(N1))
        stat[l] = R
    return stat


print(analyze_stats(l, N1))

from copy import copy
l = ['0000101001100111000111011', '0000110100011010011110100', '0000110100011110011010100', '0000110100011110011110100', '0000111000011010011010000', '0000111000011010011010100', '0000111000011010111010100', '0000111100011010111010100', '0000111100011110011010100', '0001010000011010101010100', '0001010000011010111000100', '0001010000011010111010100', '0001010000111010011010100', '0001010000111110011110100', '0001010000111110111010100', '0001010100011000111010100', '0001010100011010011010100', '0001010100011010101010100', '0001010100011010111010100', '0001010100011010111100100', '0001010100011010111110100', '0001010100011110111010100', '0001010100111110011010100', '0001010100111110111110100', '0001110000001010111010100', '0001110000011010011010000', '0001110000011010011010100', '0001110000011010011110100', '0001110000011010101010100', '0001110000011010111000100', '0001110000011010111010100', '0001110000011010111010110', '0001110000011010111100100', '0001110000011010111110100', '0001110000011110011010100', '0001110000011110111010100', '0001110000111010111010100', '0001110000111110011010000', '0001110000111110011010100', '0001110000111110011110100', '0001110000111110111010100', '0001110000111110111110100', '0001110001010010111010100', '0001110010011010111000100', '0001110100001010101010100', '0001110100001010111010110', '0001110100011010011010000', '0001110100011010011010100', '0001110100011010011110100', '0001110100011010101010100', '0001110100011010111010100', '0001110100011010111010110', '0001110100011010111110100', '0001110100011110011010000', '0001110100011110011010100', '0001110100011110011110000', '0001110100011110011110100', '0001110100011110111010100', '0001110100011110111110100', '0001110100111010011010100', '0001110100111010111010100', '0001110100111110011110100', '0001110100111110111010100', '0001110101010010111010100', '0001111000010010011010100', '0001111000011010010010100', '0001111000011010011010100', '0001111000011010011110100', '0001111000011011011010100', '0001111001011010011010100', '0001111100010010111010100', '0001111100011010011110100', '0001111100011010111010100', '0001111100011110011010100', '0001111101011010111010100', '0011000010001000101000100', '0011000010001000101000110', '0011000010001000101010100', '0011000010001100101000110', '0011000010001100101100110', '0011000010101000101000010', '0011000110001000101000110', '0011000110001000101010100', '0011000110001000101100110', '0011000110001100101000110', '0011000110001100101010100', '0011000110001100101100110', '0011000110101100101000110', '0011000110101100101100110', '0011100010001000101000110', '0011100110001000101000110', '0011100110001000101010100', '0011100110001100101100110', '0100001101000111100111111', '0100010100011010111110000', '0100010100011010111110100', '0100010100111110111110000', '0100011100011010111010100', '0100011100111110111110000', '0100011101111110111110000', '0101000100001010101010111', '0101010000011010101010110', '0101010000011010111000110', '0101010000011010111010100', '0101010000011010111110100', '0101010000011110111010100', '0101010000011110111110100', '0101010000111010111010100', '0101010000111010111110000', '0101010000111010111110100', '0101010000111110011110100', '0101010000111110111010100', '0101010100001000101010110', '0101010100001010101010110', '0101010100001010111010100', '0101010100001010111010110', '0101010100001110111110110', '0101010100011010011010000', '0101010100011010011010100', '0101010100011010011110100', '0101010100011010101010100', '0101010100011010101010110', '0101010100011010111000110', '0101010100011010111010000', '0101010100011010111010100', '0101010100011010111010110', '0101010100011010111110000', '0101010100011010111110100', '0101010100011110011110100', '0101010100011110111110100', '0101010100011110111110110', '0101010100111010011010100', '0101010100111010111010100', '0101010100111110011010100', '0101010100111110011110100', '0101010100111110111010100', '0101010100111110111110000', '0101010100111110111110100', '0101010101010010111010100', '0101011100000010111011111', '0101011100010010111010100', '0101011100011010111010100', '0101011100011010111110100', '0101011101011010111010100', '0101011101111110111110000', '0101110000011010111010100', '0101110000011010111110100', '0101110100011010111010100', '0101110100011010111110100', '0101110100011110111110100', '0110100110001100001100110', '0111000110001000101000110', '0111000110001000101010110', '0111000110001010101010110', '0111000110001100101100110', '0111000110101100001100110', '0111100010001000001100110', '0111100010001000101000110', '0111100010001100101100110', '0111100110001000001100110', '0111100110001000101000100', '0111100110001000101000110', '0111100110001100001100110', '0111100110001100101000110', '0111100110001100101100110', '0111101010001000001100110']

N1 = 222

def L1(starting_bits, bit_len):
    '''L1 generator
       Generates sequence of degree 25 and len == bit_len using polynom (x**25 ^ x**3 ^ 1)'''
    x = copy(starting_bits)
    #print(starting_bits)
    for i in range(0, bit_len-25):
        x += str(int(x[i]) ^ int(x[i+3]))
    return x

zi = '00010101000010100010101001111111111011001101010001101110101010000001010111101001110001100111000001000011100010111101010100000101011110101010111100001100000110111011000000000111011101011011000000011110001000110011100001000110001000000000011011000101111011000001110011100011011011111110111110101100000100110101100001001101001100011000011110101010011000101000010011101001000110011011000010100000101100100000100110100011111001100100001110110001001001001011110111010011110111010101010101000111100000000001111010001000010001000100010100100101001000111010001000100100001011010010000111111001001100100001111010001001100000011101001001000110111000010110111111011010011101010010100100001111111111101110010000110000010011111100001011111001010001011011100011100010110011100101101101111100011110101101001011010110111001101010000010100110001111111100110010100110110001011011001100101100101000101010001101101100111001100101110000011000111101111111001100110110111101100101010101011100011001000010111010100010101100010111110111110001000110001110100101110111010000111110011000110010010011011111111011111111011011101101001000000000001011111010101011101010010010001010110011100101010011100101010001111000010001100111100111110111101101101111001000010101001101100001010100011100100001111000110100111000011101011101011001100001110011111010000010010111111010001110001011010100011110000011100100111001100001001111111111001001000110001000111110010011101111001010000010000111011101101011101001000110011000010011010100111100011101000100101011101001011000110010110000111100110011010011110011100101100101101100100101110101010010001010101101011101011100100100110000011010110111100001111101101110011100010101011110111010110101011101110100110011101110000010101000110110111101100010111100001011101101111010111001100110010100000110011101111111000101111110010001011011010001001011000110000000100100101011010110110010001110110011100010101111001101110010010100010001110001110000110010000101111110110011111111001100101000000001110110011010100111001100010101011111000010111000010101101111'

def analyze_stats(lst, N1):
    stat = {}
    z = zi[:N1]
    for l in lst:
        x = L1(l, N1)
        R = sum(int(x[d]) ^ int(z[d]) for d in range(N1))
        stat[l] = R
    return stat

print(analyze_stats(l, N1))

