In Wlmojstan, the telephone system runs on a prefix code system. This means that every phone number has a code at the beginning that identifies the location of the caller.
Prefix codes can be of variable length, so to prevent ambiguity, each prefix code cannot share a prefix with any other prefix code.
A prefix of a prefix code is defined as the first digits in the code, with
Given a list of codes, can you identify the number of conflicting codes?
The first line will contain one integer, , the number of prefix codes in the list. .
The next lines will contain one integer, , a prefix code. .
The number of prefix codes that conflict with another prefix code.
5 4141 41 5151 5551 51