This question was asked in Ex 14.1 ,1

S=1,2,3,4,5,6 how it came

Ameesha D's image