Solve "Garbled Email" GCJ problem (small only)

This solution is too inefficient to solve the large-input problem.
Solve "Garbled Email" GCJ problem for real