for terms_cnt in range (1,n+1):
answer[terms_cnt]=0
for groups in range (1,terms_cnt+1):
answer[terms_cnt]+=stirling_number_2nd_kind[terms_cnt][groups]*factorial[groups]
Zm9yIHRlcm1zX2NudCBpbiByYW5nZSAoMSxuKzEpOgogICAgYW5zd2VyW3Rlcm1zX2NudF09MAogICAgZm9yIGdyb3VwcyBpbiByYW5nZSAoMSx0ZXJtc19jbnQrMSk6CiAgICAgICAgYW5zd2VyW3Rlcm1zX2NudF0rPXN0aXJsaW5nX251bWJlcl8ybmRfa2luZFt0ZXJtc19jbnRdW2dyb3Vwc10qZmFjdG9yaWFsW2dyb3Vwc10=