#include #define MAX_N 2001 char trucks[MAX_N][7]; int vzdalenost(int co,int koho) { int ret=0; ret+=trucks[co][0]!=trucks[koho][0]; ret+=trucks[co][1]!=trucks[koho][1]; ret+=trucks[co][2]!=trucks[koho][2]; ret+=trucks[co][3]!=trucks[koho][3]; ret+=trucks[co][4]!=trucks[koho][4]; ret+=trucks[co][5]!=trucks[koho][5]; ret+=trucks[co][6]!=trucks[koho][6]; return ret; } int main(void) { int i,j,N; int sum; int docas[MAX_N]; int vzdal[MAX_N]; while (scanf("%d",&N),N) { sum=0; for (i=0;i