
func main(){
   let split = (readLine()!).split(separator: " ").map({ Int($0)! })
   let h = split[0]
   let w = split[1]
   let k = split[2]

   var c: [[Character]] = []
   for _ in 0..<h {
      let s = Array(readLine()!)
      c.append(s)
   }
   print(c)

   var columnDict: [Int: Int] = [:]
   for i in 0..<w {
      columnDict[i] = 1
   }
   var rowDict: [Int: Int] = [:]
   for i in 0..<h {
      rowDict[i] = 1
   }

   let answer = recurse(crMap: ["col": columnDict, "row": rowDict], array: c, rowIndex: 0, colIndex: 0, k: k)
   print(answer)
}

func recurse(crMap: [String: [Int: Int]], array: [[Character]], rowIndex: Int, colIndex: Int, k: Int) -> Int {
   if rowIndex == array.count && colIndex == array[0].count {
      return good(array: array, crMap: crMap, k: k) ? 1 : 0
   }
   
   var tempMap = crMap
   var tempAns = 0
   if rowIndex < array.count {
      if colIndex < array[0].count {
         tempAns += recurse(crMap: crMap, array: array, rowIndex: rowIndex + 1, colIndex: colIndex + 1, k: k)

         var tempMap1 = crMap
         tempMap1["col"]![colIndex] = 0
         tempMap1["row"]![rowIndex] = 1
         tempAns += recurse(crMap: tempMap1, array: array, rowIndex: rowIndex + 1, colIndex: colIndex + 1, k: k)
         
         var tempMap2 = crMap
         tempMap2["col"]![colIndex] = 0
         tempMap2["row"]![rowIndex] = 0
         tempAns += recurse(crMap: tempMap2, array: array, rowIndex: rowIndex + 1, colIndex: colIndex + 1, k: k)
         
         var tempMap3 = crMap
         tempMap3["col"]![colIndex] = 1
         tempMap3["row"]![rowIndex] = 0
         tempAns += recurse(crMap: tempMap3, array: array, rowIndex: rowIndex + 1, colIndex: colIndex + 1, k: k)
      } else {
         tempMap["row"]![rowIndex] = 0
         tempAns = recurse(crMap: crMap, array: array, rowIndex: rowIndex + 1, colIndex: colIndex, k: k) +
         recurse(crMap: tempMap, array: array, rowIndex: rowIndex + 1, colIndex: colIndex, k: k)
      }
   } else if colIndex < array[0].count {
      tempMap["col"]![colIndex] = 0
      tempAns += recurse(crMap: crMap, array: array, rowIndex: rowIndex, colIndex: colIndex + 1, k: k) +
      recurse(crMap: tempMap, array: array, rowIndex: rowIndex, colIndex: colIndex + 1, k: k)
   }
   return tempAns
}

func good(array: [[Character]], crMap: [String: [Int: Int]], k: Int) -> Bool {
   var tempK = 0
   for i in 0..<array.count {
      for j in 0..<array[0].count {
         if crMap["col"]![j] == 1 && crMap["row"]![i] == 1 && array[i][j] == "#" {
            tempK += 1
         }
      }
   }
   return tempK == k
}
main()
