Raj is suffering from shot term memory loss so  he is unable to remember his laptop password  but he has a list of some string and the only thing that he remember about his password is alphanumeric and also that all the characters are unique.
Given a list of strings, your task is to find a valid password.

-----Input-----
Each String contains lower case alphabets and 0-9.

-----Output-----
print "Invalid"(without quotes) if password is not valid else print "Valid"(without quotes) and stop processing input after it.

-----Constraints-----
1<=length of string <=100

-----Example-----
Input:
absdbads
asdjenfef
tyerbet
abc564

Output:
Invalid
Invalid
Invalid
Valid

Source: codechef | Difficulty: UNKNOWN_DIFFICULTY


Solutions:
import collections
while True:
	d = input().strip()
	myCounter = collections.Counter(d)
	flag = 1
	for x in list(myCounter.keys()):
		if myCounter[x] > 1:
			flag = 0
			break
	isAlp = sum([myCounter[x] for x in list(myCounter.keys()) if x.isalnum()])
	if flag and isAlp:
		print('Valid')
		break
	else:
		print('Invalid')


def password():
	while True:
		st = input()
		ls = list(st)
		ln = len(st)
		c = 0
		fl = 0
		for i in range(0, ln):
			if ord(ls[i]) <= 122 and ord(ls[i]) >= 97:
				c = 1
			elif ls[i].isdigit():
				fl = 1
		a = 1
		for i in range(0, ln - 1):
			for j in range(i + 1, ln):
				if ls[i] == ls[j]:
					a = a + 1
		if c == 1 and fl == 1 and (a == 1):
			print('Valid')
			break
		else:
			print('Invalid')
password()


def findPassword():
	m = 'Invalid'
	while m != 'Valid':
		x = input()
		t = 1
		flag = 0
		for i in x:
			if x.count(i) > 1:
				print('Invalid')
				t = 0
				break
			if i.isdigit():
				flag = 1
		if flag == 1 and t != 0:
			print('Valid')
			m = 'Valid'
		elif t == 1:
			print('Invalid')
findPassword()


f = False
while f == False:
	s = input().strip()
	d = dict()
	f = True
	for i in s:
		if i in list(d.keys()):
			f = False
		else:
			d[i] = 1
	if not f:
		print('Invalid')
	else:
		print('Valid')


from sys import stdin
a = stdin.readlines()
for i in a:
	b = list(i.strip())
	ans = 'Invalid'
	if len(b) == len(set(b)):
		ans = 'Valid'
		print(ans)
		break
	print(ans)


while True:
	x = input()
	dic = {}
	for i in range(len(x)):
		if x[i] in dic:
			dic[x[i]] += 1
		else:
			dic[x[i]] = 1
	if len(dic) == len(x):
		if x.isalnum() == True:
			print('Valid')
			break
		else:
			print('Invalid')
	else:
		print('Invalid')


while True:
	a = input()
	if len(a):
		if a.isalnum():
			if len(a) == len(set(list(a))):
				print('Valid')
				break
			else:
				print('Invalid')
		else:
			print('Invalid')
	else:
		break


def password():
	while True:
		str = input()
		ls = list(str)
		ln = len(str)
		c = 0
		fl = 0
		for i in range(0, ln):
			if ord(ls[i]) <= 122 and ord(ls[i]) >= 97:
				c = 1
			elif ls[i].isdigit():
				fl = 1
		a = 1
		for i in range(0, ln):
			for j in range(i + 1, ln):
				if ls[i] == ls[j]:
					a += 1
		if c == 1 and fl == 1 and (a == 1):
			print('\nValid')
			break
		else:
			print('\nInvalid')
password()


try:
	while True:
		password = list(input().strip())
		temp = password[:]
		for i in password:
			if i.isdigit():
				temp.remove(i)
		password1 = set(temp)
		if len(password1) != len(temp):
			print('Invalid')
		else:
			print('Valid')
			4 / 0
except:
	return


while True:
	s = input()
	t = ''.join(set(s))
	if len(s) != len(t) or not s.isalnum():
		print('Invalid')
		continue
	print('Valid')
	break


import collections
while True:
	list1 = []
	c = input()
	flag = 1
	d = collections.Counter(c)
	for x in list(d.keys()):
		if d[x] > 1:
			flag = 0
			break
	temp1 = sum([d[x] for x in list(d.keys()) if x.isalnum])
	if flag and temp1:
		print('Valid')
		break
	else:
		print('Invalid')


import collections
while True:
	list1 = []
	c = input()
	flag = 1
	flag2 = 0
	d = collections.Counter(c)
	for x in list(d.keys()):
		if d[x] > 1:
			flag = 0
			break
	temp1 = sum([d[x] for x in list(d.keys()) if x.isalpha()])
	temp2 = sum([d[x] for x in list(d.keys()) if x.isdigit()])
	if flag and temp1 and temp2:
		print('Valid')
		break
	else:
		print('Invalid')