Code written for the 2 last codingames