The Hamming distance between two strings a and b of equal length is the number of positions where the strings differ.
You are given n bit strings, each of length k and your task is to calculate the minimum Hamming distance between two strings.
The first line has two integers n(2≤n≤2⋅104) and k(1≤k≤30): the number of bit strings and their length.
Then there are n lines each consisting of one bit string of length k.
Print the minimum Hamming distance between two strings.