H,W,K=map(int,input().split())
P=[]
for i in range(H):
    s=input()
    a=[]
    for j in range(W):
        a.append(s[j])
    P.append(a)
    
ans=0
for markR in range(2**H):
    for markC in range(2**W):
        black=0
        for i in range(H):
            for j in range(W):
                if (markR>>i)&1==0 and (markC>>j)&1==0 and P[i][j]=='#':
                    black+=1
        if black==K:
            ans+=1

print(ans)
4c6c196009140576f63be093a1a82ee9dad5e812
<mask token>

<mask token>
for i in range(H):
    s = input()
    a = []
    for j in range(W):
        a.append(s[j])
    P.append(a)
<mask token>
for markR in range(2 ** H):
    for markC in range(2 ** W):
        black = 0
        for i in range(H):
            for j in range(W):
                if markR >> i & 1 == 0 and markC >> j & 1 == 0 and P[i][j
                    ] == '#':
                    black += 1
        if black == K:
            ans += 1
print(ans)

H, W, K = map(int, input().split())
P = []
for i in range(H):
    s = input()
    a = []
    for j in range(W):
        a.append(s[j])
    P.append(a)
ans = 0
for markR in range(2 ** H):
    for markC in range(2 ** W):
        black = 0
        for i in range(H):
            for j in range(W):
                if markR >> i & 1 == 0 and markC >> j & 1 == 0 and P[i][j
                    ] == '#':
                    black += 1
        if black == K:
            ans += 1
print(ans)

H,W,K=map(int,input().split())
P=[]
for i in range(H):
    s=input()
    a=[]
    for j in range(W):
        a.append(s[j])
    P.append(a)
    
ans=0
for markR in range(2**H):
    for markC in range(2**W):
        black=0
        for i in range(H):
            for j in range(W):
                if (markR>>i)&1==0 and (markC>>j)&1==0 and P[i][j]=='#':
                    black+=1
        if black==K:
            ans+=1

print(ans)