Input Format:
The first line will contain the value of N. The next N lines will contain the values of strings S1 to SN.Boundary Conditions:
2 <= N <= 10 Length of string SN is from 2 to 200Output Format:
The first line will contain the characters C1, C2, C3, .. CN to be removed from each of these string without any space between them.Example Input/Output :
Input:2
bmanabgerb
manasgsesr
Output:
bs
Explanation:
If the character b is removed from the first string, it becomes manager. If the character s is removed from the second string, it becomes manager. Hence bs is printed as output.
Solution:
n
= int(input())
nstring
= []
for
i in range(n):
nstring += set(list(input().strip()))
count
= [0]*26
for
char in nstring:
count[ord(char)-ord('a')]+=1
for
char in nstring:
if count[ord(char)-ord('a')]==1:
print(char,end='')