Hi Hiroaki,
the problem seems clear to me, as far as I read your code.
You loop through strings and put them into a variable, let's call it
temp, and then want to store temp.encode('UTF-8') somewhere else.
The problem seems to be that the .encode() method just creates a
reference which points back to temp, but temp gets overridden the next
time the loop iterates, therefore being unstable, which causes the code
checker to cancel the compilation.
I can't give you a solution to solve your problem, I didn't read that
much that I could fix it, but maybe you can find a solution on your own
if you know the reason.
Hope I could help.
Best Regards.
Toni