Differences

아직 제출이 없습니다시간 제한2초메모리 제한1024 MB

문제

We have a list of NN strings S_iS\_i. All strings have length MM and consist only of characters A, B, C and D. Let us define the distance between two strings XX and YY as the number of indices jj, where the strings have different characters (X_jY_jX\_j \neq Y\_j). We know that the list of strings S_iS\_i contains precisely one special string that has distance KK to all other strings. Note that there might be other pairs of strings with a distance of KK. We are experiencing problems finding this special string, so please write a program to help us out.

입력

The first line contains space-separated integers NN, MM and KK. Strings S_iS\_i are given in the following NN lines.

출력

Output the index ii of the special string. Strings are numbered from 11 to NN as given in the input.

제한

  • 2N,M1052 \leq N, M \leq 10^5
  • 1KM1 \leq K \leq M
  • NM2107 N M \leq 2 \cdot 10^7