code for HackerRank