'''

rtype = 0

colIdx = {}

rowIdx = {}

for i in range(len(picture)):

inrow = 0

for j in range(len(picture[i])):

if picture[i][j] == 'B':

inrow += 1

inrowidx = j

colIdx[j] = colIdx.get(j,0) + 1

if inrow==1:

rowIdx[inrowidx] = 1

for key,val in colIdx.iteritems():

if val == 1 and rowIdx.get(key)==1:

rtype += 1

return rtype

'''