HackerEarth The AP solved :)