**TL;DR**: The Python code basically gives us a system of 37 equations with 38 variables, so we can use basic linear algebra techniques to reduce the system, and then knowing the flag format, finish out the challenge and solve for the ASCII code of each byte in the flag.