import Foundation
func solution(_ clothes:[[String]]) -> Int {
var dict = Dictionary<String, Int>()
for c in clothes{
if dict[c[1]] == nil{
dict[c[1]] = 1
}else{
dict[c[1]]! += 1
}
}
var numOfClothes = Array<Int>()
for (_ ,value) in dict{
numOfClothes.append(value)
}
return numOfClothes.reduce(1){$0 * ($1+1)} - 1
}