Hackerrank Solution For Set Notation