program paradox;
var n, i, j, count:integer;
S: array[1..325] of string;
A,B,SY: array [1..325] of char;
nodo : array[1..26] of integer;
lettere : array[1..26,1..26] of boolean;
risposta: string;
ciclo : boolean;
begin
readln(N);
for i:=1 to N do readln(S[i]);
for i:=1 to N do begin A[i]:=S[i][1]; SY[i]:=S[i][3]; B[i]:=S[i][5];end;
for i:=1 to 26 do nodo[i]:=0; ciclo:=false; count:=0;
for i:=1 to N do begin nodo[ord(A[i])-96]:=nodo[ord(A[i])-96]+1; nodo[ord(B[i])-96]:=nodo[ord(B[i])-96]+1; end;
for i :=1 to 26 do if nodo[i]<>0 then count:=count+1;
writeln (count);
if N<=count+1 then ciclo:=false
else ciclo:=true;
if ciclo=true then risposta:=':('
else risposta:=':)';
writeln(risposta);
end.
cHJvZ3JhbSBwYXJhZG94Owp2YXIgbiwgaSwgaiwgY291bnQ6aW50ZWdlcjsKICAgIFM6IGFycmF5WzEuLjMyNV0gb2Ygc3RyaW5nOwogICAgQSxCLFNZOiBhcnJheSBbMS4uMzI1XSBvZiBjaGFyOwogICAgbm9kbyA6IGFycmF5WzEuLjI2XSBvZiBpbnRlZ2VyOwogICAgbGV0dGVyZSA6IGFycmF5WzEuLjI2LDEuLjI2XSBvZiBib29sZWFuOwogICAgcmlzcG9zdGE6IHN0cmluZzsKICAgIGNpY2xvIDogYm9vbGVhbjsKCmJlZ2luCiAgICByZWFkbG4oTik7CiAgICBmb3IgaTo9MSB0byAgTiAgZG8gcmVhZGxuKFNbaV0pOwogICAgZm9yIGk6PTEgdG8gTiBkbyBiZWdpbiBBW2ldOj1TW2ldWzFdOyBTWVtpXTo9U1tpXVszXTsgQltpXTo9U1tpXVs1XTtlbmQ7CiAgICBmb3IgaTo9MSB0byAyNiBkbyBub2RvW2ldOj0wOyBjaWNsbzo9ZmFsc2U7IGNvdW50Oj0wOwogICAgZm9yIGk6PTEgdG8gTiBkbyBiZWdpbiBub2RvW29yZChBW2ldKS05Nl06PW5vZG9bb3JkKEFbaV0pLTk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