Problem Description
Given a string containing only lower case letters, print first occurrence of all the letters present in that order onlyCODING ARENA
t=int(input())
while(t>0):
s=input()
a=""
for i in s:
if i not in a:
a+=i
print(a)
t-=1
Test Case 1
Input (stdin)3 tamilnadu madam india
Expected Outputtamilndu mad inda
Test Case 2
Input (stdin)2 sivaramakrishnan welcome
Expected Outputsivarmkhn welcom
No comments:
Post a Comment