Upd: fixed author's solution links.
Sorry for the slow Editorial, I am new using Polygon.
Special thanks to TechNite for his help.
About one hour before the contest Retired_cherry found the same problem, then we changed it to $$$k=4$$$ and he found another same one again. We are running out of time so we didn't have time for a new one, so we changed $$$k$$$ to $$$5$$$. But we didn't know there is still a similar problem. Sorry again.