d='(%D)'m=d..io.read'*a':gsub('%s','%0%0')..'\n'while m do n=m:match'(%d+): *\n'm=n and(print(n)or m:gsub(d..n..d,'%1%2'))end