You are given a set of N strings. Your task is to determine the minimum possible size of set S (S is a subset of N strings) such that it meets the following conditions:
Input Format:
Output Format:
Print the minimum possible size of set S , which covers all the N strings.
Constraints:
1≤N≤5001≤|P|≤500