# Python 3 program to split an alphanumeric
# string using STL
def splitString(str):
upper = ""
lower = ""
num = ""
special = ""
for i in range(len(str)):
if (str[i].isdigit()):
num = num + str[i]
elif (str[i] >= 'A' and str[i] <= 'Z'):
upper = upper + str[i]
elif (str[i] >= 'a' and str[i] <= 'z'):
lower += str[i]
else:
special += str[i]
print(upper)
print(lower)
print(num)
print(special)
splitString(input("Type: "))