def extract_references_list(text):
    res = []
    buffer = ''
    state = 0
    for i in reversed(range(0, (len(text) - 1))):
        c = text[i]
        buffer = (c + buffer)
        if (state == 0):
            if (c == ']'):
                state = 1
        elif (state == 1):
            if (c in ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']):
                state = 2
            else:
                state = 0
        elif (state == 2):
            if (c == '['):
                res.append(buffer)
                if ((buffer[1] == '1') and (buffer[2] == ']')):
                    break
                state = 0
                buffer = ''
        else:
            print('Unknown state')
            raise
    return reversed(res)
def extract_references_list(text):
    res = []
    buffer = 
    state = 0
    for i in reversed(range(0, (len(text) - 1))):
        c = text[i]
        buffer = (c + buffer)
        if (state == 0):
            if (c == ']'):
                state = 1
        elif (state == 1):
            if (c in ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']):
                state = 2
            else:
                state = 0
        elif (state == 2):
            if (c == '['):
                res.append(buffer)
                if ((buffer[1] == '1') and (buffer[2] == ']')):
                    break
                state = 0
                buffer = 
        else:
            print('Unknown state')
            raise
    return reversed(res)