#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize ("-O3")
#define ll long long  int
#define all(x) (x).begin(), (x).end()
using ld = long double;
const ll mod = 1000000007;
const ll inf = 1000000000000000000;
const ll rk = 256;
const ld PI = 3.141592653589793;
#define pb push_back
#define mp make_pair
#define vc vector
#define fs first
#define sec second
// #define pq priority_queue
#define lb lower_bound
#define ub upper_bound
#define pll pair<ll,ll>
#define pls pair<ll,string>
#define psl pair<string,ll>
#define plc pair<ll,char>
#define pcl pair<char,ll>
#define pss pair<string,string>
#define all(x) (x).begin(), (x).end()
#define tol(s) transform(s.begin(),s.end(),s.begin(),::tolower);
#define tou(s) transform(s.begin(),s.end(),s.begin(),::toupper);
#define print(a) for(auto j:a) {cout<<j<<",";} cout << "\n";
#define endl '\n'
#define FastIO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
// getting string line
// getline(cin,word);
// -> priority_queue < int > pq; // max_heap
// -> priority_queue < int , vector < int > , greater < int > > pq; // min_heap


ostream & operator << (ostream & os, pair <ll, ll> const& x) {
    os << x.first << "," << x.second;
    return os;
}

template <class T>
ostream & operator << (ostream & os, vector <T> const& x) {
    os << "{ ";
    for(auto& y : x) os << y << " ";
    return os << "}";
}

template <class T>
ostream & operator << (ostream & os, set <T> const& x) {
    os << "{ ";
    for(auto& y : x) os << y << " ";
    return os << "}";
}

template <class Ch, class Tr, class Container>
basic_ostream <Ch, Tr> & operator << (basic_ostream <Ch, Tr> & os, Container const& x) {
    os << "{ ";
    for(auto& y : x) os << y << " ";
    return os << "}";
}

template <class X, class Y>
ostream & operator << (ostream & os, pair <X, Y> const& p) {
    return os << "[ " << p.first << ", " << p.second << "]" ;
}

struct comp {
    bool operator()(int const &i, int const &j) const {
        return i > j;
    }
};

struct Triplet{
    ll x,y,z;
};
ll n,m,k;
char mat[7][7];
ll ans;
vc<pll> p;


void func(ll ind, vector<pll> subs){
    if(ind!= p.size()){
        func(ind + 1, subs);
        subs.pb(p[ind]);
        func(ind+1,subs);
    }
    else{
        vc<ll> row,col;
        for(auto x : subs)
            if(x.second == 1)
                row.pb(x.first);
            else
                col.pb(x.first);
        char temp[n][m];
        for(ll i = 0; i < n; i++){
            for(ll j = 0; j < m; j++){
                temp[i][j] = mat[i][j];
            }
        }
        for(auto c : col)
            for(ll i = 0; i < n; i++)
                temp[i][c] = 'R';
        for(auto r : row)
            for(ll j = 0; j < m; j++)
                temp[r][j] = 'R';
        
        ll count = 0;
        for(ll i = 0; i < n; i++)
            for(ll j = 0; j < m; j++)
                if(temp[i][j] == '#')
                    count++;
        if(count == k)
            ans+=1;
        
    }
}

int main(){
    FastIO;
    cin >> n >> m >> k;
    for(ll i = 0; i < n; i++){
        for(ll j = 0; j < m; j++){
            cin >> mat[i][j];
        }
    }
    for(ll i = 0; i < n; i++)
        p.pb({i, 1});
    for(ll i = 0; i < m; i++)
        p.pb({i, 2});
    vector<pll> X;
    func(0,X);
    cout<<ans<<endl;
    return 0;
}
    

Measured memory_bytes: 3656