For this Question: Given a string, the task is to remove duplicates from it. Expected time complexity O(n) where n is length of the input string and extra space O(1) under the assumption that there are total of 256 possible characters in a string.

Note: that original order of characters must be kept same.The first line of the input is the number of test cases T. And the first line of a test case contains a string.

Constraints: 
1 <= T <= 15
1 <= |string|<= 15000Modified string without duplicates and the same order of characters.Input:
2
hello
helloworld

Output:
helo
helowrd, I have written this Solution Code: for _ in range(int(input())):
	s=input()
	a=[]
	for i in s:
		if (i not in a):
			print(i,end="")
			a.append(i)
	print(), In this Programming Language: Python, Now tell me if this Code is compilable or not?