Today, the problem G2 could be solved in an extravagant way, using randomized xor-hashing, I am not quite sure what is the chance that I will get hacked,so please feel free to either try and hack my solution, or write a comment describing approximated chance of my random getting hacked. (If you do come up with the approximation, i will edit the blog to include your statement)
Here`s the submission 238069601
UPD: My solution turned out to be the one that is the main one