#import std::string s[51];char t[50],i,j;main(){for(;gets(t);)s[i++]=t;for(sort(s,s+i);++j