Added a slow code for problem 12