UK and US: Part 2

  • + 0 comments
    s = " ".join([input() for _ in range(int(input()))]).split()
    
    for _ in range(int(input())):
        i = input()
        print(s.count(i) + s.count(i.replace("our", "or")))