Comprehension Passage
Direction: Answer Questions based on the following data and with the help of the given figure.

A = 30, represents total number of students in class studying Physics.
B = ?, represents total number of students studying Chemistry.
C = 40, represents total number of students studying Mathematics.
12 Students are studying Physics and Chemistry but not Mathematics.
16 Students are studying Chemistry and Mathematics but not Physics.
4 Students are studying Physics, Chemistry and Mathematics.
If students studying Physics and Mathematics, Physics, Chemistry and Mathematics are 14 in number, then what is the value of q ?
1
6
2
5
3
10
4
4