#-*- coding: utf-8 -*- import sys, re regex = re.compile(r"\[(?P\d+)\]|(?P