about summary refs log tree commit diff
path: root/codechef/chefing.py
blob: e3c71a1952afebab15900e1b6c0d4786bd6563fe (plain) (blame)
1
2
3
4
5
6
#!/usr/bin/env python3
from functools import reduce
from operator import and_

for _ in range(int(input())):
    print(len(reduce(and_, (set(input()) for _ in range(int(input()))))))