Problem:
 Score : 300 points    Problem Statement You drew lottery N times. In the i -th draw, you got an item of the kind represented by a string S_i .  How many kinds of items did you get?      Constraints  1 \leq N \leq 2\times 10^5  S_i consists of lowercase English letters and has a length between 1 and 10 (inclusive).         Input Input is given from Standard Input in the following format:  N  S_1  :  S_N       Output Print the number of kinds of items you got.        Sample Input 1 3
apple
orange
apple      Sample Output 1 2  You got two kinds of items: apple and orange .       Sample Input 2 5
grape
grape
grape
grape
grape      Sample Output 2 1       Sample Input 3 4
aaaa
a
aaa
aa      Sample Output 3 4

Solution (Python):
n = int(input())
ans = set()
for _ in range(n):
    ans.add(input())
print(len(ans))

Solution (Python):
N = int(input())
res = set()
for i in range(N):
  a = input()
  res.add(a)
print(len(res))

Solution (Python):
N = int(input())
got = set()

for _ in range(N):
    got.add(input())

print(len(got))

Solution (Python):
import sys
sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
from collections import Counter
def resolve():
    N = ir()
    S = []
    for i in range(N):
        S.append(sr())
    print(len(Counter(S).keys()))
resolve()

Solution (Python):
from statistics import median


from fractions import gcd
from itertools import combinations 
from collections import deque
from collections import defaultdict
import bisect










import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    n = int(input())
    S = [input() for _ in range(n)]
    print(len(set(S)))



if __name__ == '__main__':
  main()

Solution (Python):
N = int(input())
S = [input() for _ in range(N)]

print(len(set(S)))

Solution (Python):
n = int(input())
s = list(input() for _ in range(n))
print(len(list(set(s))))

Solution (Python):
n=int(input())
ans=set()
for i in range(n):
    s=input()
    ans.add(s)
print(len(ans))

Solution (Python):
import sys
Debug = lambda *args: None
if len(sys.argv) > 1:
	sys.stdin = open("io/test.in", "r")
	Debug = lambda *args: print('\033[0;31m', *args, '\033[0m', file=sys.stderr)




def Rd(f=int):
	return [f(x) for x in input().split()]


def JoinF(arr):
	return ' '.join('{:.10f}'.format(x) for x in arr)





def main():
	n = int(input())
	S = set(input() for _ in range(n))
	print(len(S))


main()

Solution (Python):

import re
import math
from collections import defaultdict
import itertools
from copy import deepcopy
import random
from heapq import heappop,heappush
import time
import os
import queue
import sys
import datetime
from functools import lru_cache
readline=sys.stdin.readline
sys.setrecursionlimit(2000)

alphabet="abcdefghijklmnopqrstuvwxyz"
mod=int(10**9+7)
inf=int(10**20)
def yn(b):
    if b:
        print("yes")
    else:
        print("no")
def Yn(b):
    if b:
        print("Yes")
    else:
        print("No")
def YN(b):
    if b:
        print("YES")
    else:
        print("NO")
class union_find():
    def __init__(self,n):
        self.n=n
        self.P=[a for a in range(N)]
        self.rank=[0]*n
 
    def find(self,x):
        if(x!=self.P[x]):self.P[x]=self.find(self.P[x])
        return self.P[x]
 
    def same(self,x,y):
        return self.find(x)==self.find(y)
 
    def link(self,x,y):
        if self.rank[x]<self.rank[y]:
            self.P[x]=y
        elif self.rank[y]<self.rank[x]:
            self.P[y]=x
        else:
            self.P[x]=y
            self.rank[y]+=1
 
    def unite(self,x,y):
        self.link(self.find(x),self.find(y))
 
    def size(self):
        S=set()
        for a in range(self.n):
            S.add(self.find(a))
        return len(S)
def is_power(a,b):
    now=b
    while now<a:
        now*=b
    if now==a:return True
    else:return False
def bin_(num,size):
    A=[0]*size
    for a in range(size):
        if (num>>(size-a-1))&1==1:
            A[a]=1
        else:
            A[a]=0
    return A
def get_facs(n,mod_=0):
    A=[1]*(n+1)
    for a in range(2,len(A)):
        A[a]=A[a-1]*a
        if(mod>0):A[a]%=mod_
    return A
def comb(n,r,mod,fac):
    if(n-r<0):return 0
    return (fac[n]*pow(fac[n-r],mod-2,mod)*pow(fac[r],mod-2,mod))%mod
def next_comb(num,size):
    x=num&(-num)
    y=num+x
    z=num&(~y)
    z//=x
    z=z>>1
    num=(y|z)
    if(num>=(1<<size)):return False
    else:
        return num
def get_primes(n,type="int"):
    A=[True]*(n+1)
    A[0]=False
    A[1]=False
    for a in range(2,n+1):
        if A[a]:
            for b in range(a*2,n+1,a):
                A[b]=False
    if(type=="bool"):return A
    B=[]
    for a in range(n+1):
        if(A[a]):B.append(a)
    return B
def is_prime(num):
    if(num<=2):return False
    i=2
    while i*i<=num:
       if(num%i==0):return False
       i+=1
    return True
def ifelse(a,b,c):
    if a:return b
    else:return  c
def join(A,c=" "):
    n=len(A)
    A=list(map(str,A))
    s=""
    for a in range(n):
        s+=A[a]
        if(a<n-1):s+=c
    return s
def factorize(n,type_="dict"):
    b = 2
    list_ = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            list_.append(b)
        b+=1
    if n > 1:list_.append(n)
    if type_=="dict":
        dic={}
        for a in list_:
            if a in dic:
                dic[a]+=1
            else:
                dic[a]=1
        return dic
    elif type_=="list":
        return list_
    else:
        return None
def floor_(n,x=1):
    return x*(n//x)
def ceil_(n,x=1):
    return x*((n+x-1)//x)
def hani(x,min_,max_):
    ret=x
    if x<min_:ret=min_
    if x>max_:ret=max_
    return ret
def seifu(x):
    return x//abs(x)


def main():
    N=int(input())
    S=[]
    for a in range(N):
        S.append(input())
    S=set(S)
    ans=len(S)
    print(ans)
        
main()

Solution (Python):
n = int(input())
s= [input() for i in range(n)]
s=set(s)
print(len(s))

Solution (Python):
n = int(input())
ss = {}
num = 0

for i in range(n):
    s = input()
    if s not in ss:
        ss[s] = "exist"
        num += 1

print(num)

Solution (Python):
import sys
from collections import deque
def input(): return sys.stdin.readline().strip()


def main():
    N = int(input())
    S = set([])
    for _ in range(N):
        S.add(input())
    print(len(S))
    
    

if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
s = ['']*N
for i in range(N):
  s[i] = input()
print(len(set(s)))

Solution (Python):
n = int(input())

s = set()

for i in range(n):
    s.add(input())

print(len(s))

Solution (Python):
N = int(input())
s = set()
for i in range(N):
    s.add(input())

print(len(s))

Solution (Python):
n = int(input())
s = list(input() for i in range(n))

print(len(set(s)))

Solution (Python):
N = int(input())
S = set(input() for _ in range(N))
print(len(S))

Solution (Python):
n = int(input())
ls = [0] * n
for i in range(n):
    ls[i] = input()
print(len(set(ls)))

Solution (Python):
N = int(input())
d = set()
for i in range(N):
    S = input()
    d.add(S)
print(len(d))

Solution (Python):
n=int(input())

item=set([])
for _ in range(n):
    item.add(input())

print(len(list(item)))

Solution (Python):
import sys, math
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

N = ri()
h = {}
for i in range(N):
	h[rs()] = 1
print(len(h))

Solution (Python):
import collections
n = int(input())
s = [input() for i in range(n)]

print(len(collections.Counter(s)))

Solution (Python):
n = int(input())
s = [input() for _ in range(n)]

print(len(set(s)))

Solution (Python):
import collections
import math
import operator as op
from functools import reduce
from collections import Counter
import numpy as np
import math
import bisect
import heapq

MOD = 1000000007


def get_inputs(cast_func=None):
    if cast_func is None:
        return input().split()
    else:
        return list(map(cast_func, input().split()))


def get_input(cast_func=None):
    if cast_func is None:
        return input()
    else:
        return cast_func(input())


def main():
    N = get_input(int)
    Ss = set()
    for i in range(N):
        S = get_input()
        Ss.add(S)
    print(len(Ss))


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
s = [input() for _ in range(n)]
print(len(set(s)))

Solution (Python):
N = int(input())
res = set()
for _ in range(N):
    res.add(input())

print(len(res))

Solution (Python):

x = int(input())

line = []

for i in range(0,x):
    line.append(input())

temp = set(line)
print(len(temp))

Solution (Python):
N = int(input())
S = []

for _ in range(N):
    S.append(input())

S = list(set(S))

print(len(S))

Solution (Python):
N=int(input())
di = {}
for i in range(N):
    s = input()
    di[s] = 0
print(len(di))

Solution (Python):
from collections import defaultdict

N = int(input())
S = [input() for _ in range(N)]

d = defaultdict(int)

for s in S:
    d[s] += 1

print(len(d))

Solution (Python):
n = int(input())
p = set()
for i in range(n):
  p |= {input()}
print(len(p))

Solution (Python):
N = int(input())
S = [input() for _ in range(N)]
ans = list(set(S))
print(len(ans))

Solution (Python):
n = int(input())
s = [input() for _ in range(n)]
print(len(set(s)))

Solution (Python):
import sys


def input():
    return sys.stdin.readline().strip()


def main():
    N = int(input())
    S = set([input() for _ in range(N)])
    print(len(S))


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
S = [input() for _ in range(N)]
print(len(set(S)))

Solution (Python):
from sys import stdin
input = stdin.readline

N = int(input())
S = [input().rstrip() for _ in range(N)]

S = set(S)

print(len(S))

Solution (Python):






import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr


def lcm(a, b):
    return a * b // gcd (a, b)





N= inputI()
l = inputSLs(N)

print(len(set(l)))

Solution (Python):


n = int(input())

s = [ input() for _ in range(n) ]


print(len(set(s)))

Solution (Python):
import collections as cl

N = int(input())
S_list = []
for i in range(N) :
    S_list.append(input())

c = cl.Counter(S_list)
print(len(c))

Solution (Python):

"""
Created on Sun Apr 26 20:57:12 2020

@author: Kanaru Sato
"""

n = int(input())

dic = {}

for i in range(n):
    s = input()
    if s in dic:
        dic[s] += 1
    else:
        dic[s] = 1

print(len(dic))

Solution (Python):
N = int(input())
S = [input() for _ in range(N)]
print(len(set(S)))

Solution (Python):
def c_gacha():
    from collections import Counter
    N = int(input())
    Prizes = [input() for _ in range(N)]
    return len(Counter(Prizes))

print(c_gacha())

Solution (Python):
import collections
n = int(input())
l = list()
for i in range(n):
    l.append(str(input()))
c = collections.Counter(l)
print(len(c))

Solution (Python):
N = int(input())
d = set()
for _ in range(N):
    d.add(input())
print(len(d))

Solution (Python):
import math

def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]






s = set()
N = int(input())
for i in range(N):
    S = input()
    s.add(S)

print(len(s))

Solution (Python):
import sys
from collections import defaultdict, Counter, deque
from itertools import accumulate, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right, bisect
from heapq import heappop, heappush
from fractions import gcd
from math import ceil, floor, sqrt, cos, sin, pi
from copy import deepcopy




def main():
    N = int(input())
    print(len(set([input() for _ in range(N)])))

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
s = ["" for _ in range(n)]
for i in range(n):
	s[i] = input()
print(len(set(s)))

Solution (Python):
n = int(input())
ls = []
for _ in range(n):
  ls.append(input())
  
print(len(list(set(ls))))

Solution (Python):
N=int(input())
S=len(set([str(input()) for i in range(N)]))
print(S)

Solution (Python):















mod = int(1e9+7)
INF = 1<<29
lINF = 1<<35

def readInt():
    return list(map(int,input().split()))

def main():
    n = int(input())
    s = set()
    for i in range(n):
        s.add(input())
    print(len(s))
    return

if __name__=='__main__':
    main()

Solution (Python):
N = int(input())
S = [input() for _ in range(N)]
print(len(set(S)))

Solution (Python):
import sys
from io import StringIO
import unittest


def resolve():
    n = int(input())
    s = [input() for _ in range(n)]

    print(len(set(s)))


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """3
apple
orange
apple"""
        output = """2"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """5
grape
grape
grape
grape
grape"""
        output = """1"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """4
aaaa
a
aaa
aa"""
        output = """4"""
        self.assertIO(input, output)

if __name__ == "__main__":
    
    resolve()

Solution (Python):
n = int(input())
k = set()
for i in range(n):
	k.add(input())
print(len(k))

Solution (Python):

import sys

def solve(N: int, S: "List[str]"):
    print(len(set(S)))
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    S = [next(tokens) for _ in range(N)]  
    solve(N, S)

if __name__ == '__main__':
    main()

Solution (Python):
import sys
input = sys.stdin.readline

N = int(input())
S = set()

for _ in range(N):
    s = input().strip()
    S.add(s)

print(len(S))

Solution (Python):
from sys import stdin
def main():
    
    readline=stdin.readline
    N=int(readline())
    d=dict()
    for i in range(N):
        s=readline().strip()
        if s not in d:
            d[s]=1
        else:
            pass
    
    print(len(d))

if __name__=="__main__":
    main()

Solution (Python):
n=int(input())
a=[]
for i in range(n):
    a.append(input())
print(len(set(a)))

Solution (Python):
N = int(input())
D = {}
for i in range(N):
  s = input()
  if s in D:
    D[s] += 1
  else:
    D[s] = 1
print(len(D))

Solution (Python):
_,*a=open(0).read().split()
print(len(set(a)))

Solution (Python):
import sys
input = sys.stdin.readline
def main():
    N = int(input())
    ans = set()
    for _ in range(N):
        s = input().rstrip("\r\n")
        ans.add(s)
    print(len(ans))
if __name__ == "__main__":
    main()

Solution (Python):



 
import sys
import math



 

fileoperation=0
if(fileoperation):
    orig_stdout = sys.stdout
    orig_stdin = sys.stdin
    inputfile = open('W:/Competitive Programming/input.txt', 'r')
    outputfile = open('W:/Competitive Programming/output.txt', 'w')
    sys.stdin = inputfile
    sys.stdout = outputfile


mod=1000000007
 

def nospace(l):
    ans=''.join(str(i) for i in l)
    return ans
 
 
 

t=1
for tt in range(t):
    n=int(input())
    s=set()
    for i in range(n):
        p=str(input())
        s.add(p)
    print(len(s))
    
    
    
    

if(fileoperation):
    sys.stdout = orig_stdout
    sys.stdin = orig_stdin
    inputfile.close()
    outputfile.close()

Solution (Python):
n = int(input())
s = set(input() for _ in range(n))
print(len(s))

Solution (Python):
n = int(input())
ans = set()
for _ in range(n):
    ans.add(input())
print(len(ans))

Solution (Python):
n=int(input())
s=[input() for i in range(n)]
print(len(set(s)))

Solution (Python):
from collections import Counter

N = int(input())
S = [input() for _ in range(N)]

c = Counter(S)
print(len(c.keys()))

Solution (Python):
from sys import stdin
input = stdin.readline

s = set()

for _ in range(int(input())):
    s.add(input().rstrip())

print(len(s))

Solution (Python):
n = int(input())
print(len(set([input() for _ in range(n)])))

Solution (Python):
n = int(input())
s = set([])
for i in range(n):
    s.add(input())
print(len(s))

Solution (Python):
import numpy as np
import math
n = int(input())
d = dict()
for i in range(n):
    s = str(input())
    if s in d:
        continue
    else:
        d[s] = 1
print(len(d))

Solution (Python):
N = int(input())
S = [str(input()) for _ in range(N)]
print(len(set(S)))

Solution (Python):
from collections import defaultdict

def solve():
    N = int(input())
    A = [input() for _ in range(N)]
    d = defaultdict(int)
    
    for a in A:
        d[a] += 1
    
    return len(d)

print(solve())

Solution (Python):
def examA():
    S, W = LI()
    if S<=W:
        print("unsafe")
    else:
        print("safe")
    return

def examB():
    A, B, C, D = LI()
    while(True):
        C -= B
        if C<=0:
            print("Yes")
            break
        A -= D
        if A<=0:
            print("No")
            break
    return

def examC():
    N = I()
    S = [SI()for _ in range(N)]
    Set = set(S)
    ans = len(Set)
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(readline())
def LI(): return list(map(int,readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = 10**(-12)
alphabet = [chr(ord('a') + i) for i in range(26)]

sys.setrecursionlimit(10**7)

if __name__ == '__main__':
    examC()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""

Solution (Python):
N=int(input())
S=set()
for i in range(N):
  S.add(input())
print(len(S))

Solution (Python):
n=int(input())
s=list(input() for i in range(n))
ans=set()
for i in range(n):
    ans.add(s[i])

ans=list(ans)
print(len(ans))

Solution (Python):
n = int(input())
s = [input() for _ in range(n)]
s = list(set(s))
print(len(s))

Solution (Python):
import sys
import math
import collections
from collections import deque
from functools import reduce
import heapq
n = int(input())




a = []
for i in range(n):
    a.append(input())

c = collections.Counter(a)
print(len(c))

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
 

def ii(): return int(sys.stdin.readline().rstrip()) 
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) 
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]

def ss(): return sys.stdin.readline().rstrip() 
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) 
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]




n=ii()
arr=[]
for i in range(n):
    s=ss()
    arr.append(s)

print(len(list(set(arr))))

Solution (Python):
from collections import deque
from heapq import heapify,heappop,heappush,heappushpop
from copy import copy,deepcopy
from itertools import permutations,combinations
from collections import defaultdict,Counter
from bisect import bisect_left,bisect_right


from functools import reduce
from pprint import pprint

def myinput():
    return map(int,input().split())

def mylistinput(n):
    return [ list(myinput()) for _ in range(n) ]

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col,reverse_flag):
    data.sort(key=lambda x:x[col],reverse=reverse_flag)
    return data

def mymax(data):
    M = -1*float("inf")
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M

def mymin(data):
    m = float("inf")
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m

def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
    else:
        if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error")

n = int(input())
s = [ input() for _ in range(n) ]

ans = len(list(set(s)))

print(ans)

Solution (Python):
n = int(input())
s = [''] * n
for i in range(n):
    s[i] = input()
print(len(set(s)))

Solution (Python):
from collections import defaultdict

d = defaultdict(int)

n = int(input())

for i in range(n):
    key = input()
    d[key] += 1

print(len(d))

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from heapq import heapify, heappop, heappush

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
S = [input() for i in range(N)]

a =set(S)
print(len(a))

Solution (Python):
n=int(input())
s=[input() for _ in range(n)]
print(len(set(s)))

Solution (Python):
import bisect
import copy
import heapq
import math
import sys
from collections import *
from itertools import accumulate, combinations, permutations, product
from math import gcd
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

n=int(input())
s=[input() for i in range(n)]

lst=list(Counter(s))
print(len(lst))

Solution (Python):
n = int(input())
items = {}

for i in range(n):
    items[input()] = True

print(len(items))

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    N = int(input())
    s = [input() for _ in range(N)]
    print(len(set(s)))

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
S = []
for i in range(N):
    S.append(input())
T = set(S)
print(len(T))

Solution (Python):
n=int(input())
ans=set()
for _ in range(n):
    ans.add(input())
print(len(ans))

Solution (Python):
N = int(input())
print(len(set([input() for i in range(N)])))

Solution (Python):
n = int(input())
S = set()
for i in range(n):
    s = str(input())
    S.add(s)
print(len(S))

Solution (Python):
N = int(input())
S = [str(input()) for _ in range(N)]

T = set(S)

print (len(T))

Solution (Python):
n = int(input())
s = set()
for _ in range(n):
    S = input()
    s.add(S)
print(len(s))

Solution (Python):
n = int(input())
s = [input() for _ in range(n)]
print(len(set(s)))

Solution (Python):
n = int(input())
items = set()
for _ in range(n):
    items.add(input())

print(len(items))

Solution (Python):
n = int(input())
S = [input() for _ in range(n)]

s = set(S)
print(len(s))

Solution (Python):


n=int(input())
s=[input() for _ in range(n)]

print(len(set(s)))

Solution (Python):
n=int(input())
s=set()
for i in range(n):
    s.add(input())
print(len(s))

Solution (Python):
from sys import stdin
from sys import setrecursionlimit
import math
setrecursionlimit(10 ** 7)

n = int(stdin.readline().rstrip())
s = [input() for _ in range(n)]
se = set()
for i in s:
    se.add(i)
print(len(se))

Solution (Python):
n = int(input())
s = set([])

for i in range(n):
    s.add(input())
print(len(s))

Solution (Python):
import collections
N = int(input())
l = []
for x in range(N):
  s = input()
  l.append(s)
c = collections.Counter(l)
print(len(c))

Solution (Python):
n = int(input())
s=['' for _ in range(n)]
for i in range(n):
    s[i]=input()
s=list(set(s))
print(len(s))

Solution (Python):
N = int(input())
items = set([])

for _ in range(N):
    items.add(str(input()))

print(len(items))

Solution (Python):
n=int(input())
li=set()

for i in range(n):
    s=input()
    li.add(s)

print(len(li))

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    d = {}
    for _ in range(int(input())):
        s = input().strip()
        if s in d:
            continue
        d[s] = True
    print(len(d))


if __name__ == '__main__':
    main()

Solution (Python):
A = int(input())
B = set()
for i in range(A):
    B.add(input())
print(len(B))

Solution (Python):
n = int(input())
ls = []
for i in range(n):
    s = input()
    ls.append(s)
print(len(set(ls)))

Solution (Python):
n = int(input())
s = [input() for i in range(n)]
s = set(s)
ans = len(s)
print(ans)

Solution (Python):
n  = int(input())
s  = set()
for i in range(n):
	tmp = input()
	s.add(tmp)
print(len(s))

Solution (Python):
from collections import defaultdict as dict

n = int(input())
d = dict(int)
for i in range(n):
    s = input()
    d[s] += 1
print(len(d))

Solution (Python):
n=int(input())
res=set()
for i in range(n):
    res.add(input())
print(len(res))

Solution (Python):
N = int(input())

from collections import defaultdict

d = defaultdict(int)

for i in range(N):
    S = input()
    d[S]+=1

print(len(d.keys()))

Solution (Python):
n = int(input())
li = [input() for _ in range(n)]
print(len(set(li)))

Solution (Python):
n = int(input())

print(len(set(input() for _ in range(n))))

Solution (Python):
N = int(input())
S = [input() for _ in range(N)]

S = set(S)
print(len(S))

Solution (Python):
def main():
    N = int(input())
    r = set()
    for _ in range(N):
        r.add(input())
    return len(r)

print(main())

Solution (Python):


import sys
import math
import collections
import itertools
INF = 10 ** 13
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def lcm(x, y) : return (x * y) // math.gcd(x, y)
def I() : return int(input())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def LS() : return input().split()
def RS(N) : return [input() for _ in range(N)]
def LRS(N) : return [input().split() for _ in range(N)]
def PL(L) : print(*L, sep="\n")
def YesNo(B) : print("Yes" if B else "No")
def YESNO(B) : print("YES" if B else "NO")

N = I()

s = set()
for i in range(N):
    s.add(input())

print(len(s))

Solution (Python):
N = int(input())

ans = set()
for _ in range(N):
    ans.add(input())

print(len(ans))

Solution (Python):
n = int(input())
results = {input() for _ in range(n)}
print(len(results))

Solution (Python):

MOD = 10 ** 9 + 7
INFI = 10**10

import math

import itertools
import heapq


import copy
from functools import lru_cache

def sosuhante(n):
    for k in range(2, int(math.sqrt(n))+1):
        if n% k ==0:
            return False
    return True
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def kingaku(a,b,n):
    keta=len(str(n))
    return a*n+b*keta

def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default




def ret(a):
    c=[None]*(len(a)-1)
    if len(a)==1:
        return a[0]
    elif len(a)==0:
        return 0
    for i in range(1,len(a)):
        c[i-1]=abs(a[i]-a[i-1])
    return ret(c)


def main():
    n=int(input())
    s=set()
    for i in range(n):
        s.add(input())
    print(len(s))



if __name__ == "__main__":

    main()

Solution (Python):
import sys
range = xrange
input = raw_input

print len(set(sys.stdin.read().split())) - 1

Solution (Python):
num = int(input())
l1 = [input() for i in range(num)]
l2 = set(l1)
print(len(l2))