[http://petr-mitrichev.blogspot.com/2015/10/a-week-with-old-self.html](http://petr-mitrichev.blogspot.com/2015/10/a-week-with-old-self.html)↵
↵
UPD. I've originally forgot to include function extraMatrix in the code I posted, and it contains an important part of the logic. Post updated.
↵
UPD. I've originally forgot to include function extraMatrix in the code I posted, and it contains an important part of the logic. Post updated.