In a competition a school awarded medals i different categories, 36 medals in dance, 12 medals in dramatics and 18 medals in music. If these medals went a total of 45 persons and only 4 persons got medals in all thr three categories, hk many received medals in exactly two of these categories?