Hacker Rank :  package refactor