also you should consider NEVER using gets
You would recommend  scanf("%[^\n]%*c", str); right? .. or something else
KEKI
Anonymous
Anonymous
Ling
Dima
MilkBeforeCereal
Dima
Lelouch
Mat
Dima
klimi
HLEBR
HLEBR
Yakov