My unfinished solution for some programming problem