#C2926. Taco Partition

    ID: 46296 Type: Default 1000ms 256MiB

Taco Partition

Taco Partition

You are given an integer n and n strings. Your task is to partition these strings into two groups under a special constraint: no string in one group should have a conflicting property with any string in the other group. The conflict is defined in terms of a so-called \(\text{yellow number}\) and \(\text{blue number}\). In particular, the condition is that no yellow number from one group is equal to any blue number from the other group.

For this problem, the condition is greatly simplified: you must always select the first string to be in group A. That is, group A will consist solely of the first string. The expected output is the number of strings in group A followed by their 1-indexed positions.

Output Format: Output two lines. The first line should contain \( |A| \) (the number of strings in group A). The second line should list the indices (using 1-indexing) of the strings in group A, separated by spaces. Since group A always contains the first string, the correct answer is always 1 on the first line and 1 on the second line.

inputFormat

The input is given via standard input and is formatted as follows:

  • The first line contains an integer n — the number of strings.
  • This is followed by n lines, each containing a non-empty string.

outputFormat

The output should be printed to standard output and consist of two lines:

  • The first line contains the number of strings in group A.
  • The second line contains the 1-indexed positions of the strings in group A, separated by a space.
## sample
3
abc
abd
acd
1

1

</p>