#include <bits/stdc++.h>
#define MOD 1000000007
#define ll long long int
#define db double
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL)
#define pb push_back
#define endl "\n"
#define mp make_pair
#define f first
#define s second
ll power(ll x, ll y){ ll ans = 1;x %= MOD;while(y){if(y&1)ans = (x * ans) % MOD;x = (x * x) % MOD;y >>= 1;}return ans;}
ll modInverse(ll a, ll m){ll m0 = m;ll y = 0, x = 1;if (m == 1) return 0;while (a > 1){ ll q = a / m;ll t = m;m = a % m,a = t;t = y;y = x - q * y;x = t;}if(x < 0) x += m0;return x;}
using namespace std;

#define no cout << "NO\n"
#define yes cout << "YES\n"



int ans;

void helper(char** grid, map<string, bool>& haveBeen, int m, int n, int delRow, int delCol, unordered_map<int, int>& rowCount, unordered_map<int, int>& colCount, int k, vector<int>& visitedRows, vector<int>& visitedCols, int rem) {
    
    
    string r = "", c = "";
    for(int i : visitedRows) {
        r += to_string(i);
    }
    for(int i : visitedCols) {
        c += to_string(i);
    }
    //cout << r + c << endl;
    
    if(haveBeen[r + c])
        return;
        
    
    haveBeen[r + c] = true;
    
    rem = 0;
    
    for(int i = 0; i < m; i++) {
        if(visitedRows[i])
            continue;
        for(int j = 0; j < n; j++) {
            if(visitedCols[j])
                continue;
            if(grid[i][j] == '#')
                rem++;
        }
    }
    
    if(rem < k)
        return;
    
    if(delCol == 0 && delRow == 0) {
        if(rem == k) {
            //cout << r << endl << c << endl << endl;
            ans++;
        }
        return;
    } 
    vector<int> currVisitedC(n, 0), currVisitedR(m, 0);
    if(delCol != 0) {
        for(int i = 0; i < n; i++) {
            if(visitedCols[i])
                continue;
            visitedCols[i] = 1;
            //currVisitedC[i] = 1;
            helper(grid, haveBeen, m, n, delRow, delCol - 1, rowCount, colCount, k, visitedRows, visitedCols, rem - colCount[i]);
        
            visitedCols[i] = 0;
        }
    }
    
    // for(int i = 0; i < n; i++) {
    //     if(currVisited[i])
    //         visitedCols[i] = 0;
    // }
    
    if(delRow != 0) {
        for(int i = 0; i < m; i++) {
            if(visitedRows[i])
                continue;
            visitedRows[i] = 1;
            helper(grid, haveBeen, m, n, delRow - 1, delCol, rowCount, colCount, k, visitedRows, visitedCols, rem - rowCount[i]);
        
            visitedRows[i] = 0;
        }
    }
    
}

void solve() {
    ans = 0;
    int n, m, k;
    cin >> m >> n >> k;
    
    char** grid = new char*[m];
    unordered_map<int, int> rowCount, colCount;
    int total = 0;
    
    for(int i = 0; i < m; i++) {
        grid[i] = new char[n];
        for(int j = 0; j < n; j++) {
            cin >> grid[i][j];
            if(grid[i][j] == '#') {
                total++;
                rowCount[i]++;
                colCount[j]++;
            }
        }
    }
    
    if(k > total) {
        cout << "0\n";
        return;
    }
    
    for(int i = 0; i < m; i++) {
        for(int j = 0; j < n; j++) {
            vector<int> visitedRows(m, 0), visitedCols(n, 0);
            map<string, bool> haveBeen;
            helper(grid, haveBeen, m, n, i, j, rowCount, colCount, k, visitedRows, visitedCols, total);
        }
    }
    cout << ans << endl;
}

int main() {
    fastio;
    solve();
}


Measured memory_bytes: 4028