https://medium.com/@eyajamuehaque/2048a-kevin-and-combination-lock-codeforces-solution-in-c-e2b814104283