# 위장
def solution(clothes):
d = dict()
for clothes in clothes:
if clothes[1] in d:
d[clothes[1]] += 1
else:
d[clothes[1]] = 1
ret = 1
for i in list(d.values()):
ret *= (i + 1)
return ret - 1