s={*str(9**40)}; for i in[0]*int(input()):t={*input()};s=s&t if"Y"in t else s-t print(*s)