

n = input()

list = n.split(" ")

countU=0
countL=0



for i in list:
    for j in i:
        if(j.isalpha()):
            if j.isupper():
                countU+=1
            else:
                countL+=1


print("UPPER CASE %d"%countU)
print("LOWER CASE %d"%countL)





3970aae978a5869eae8e56ac822e8be43f2c6e0f
<mask token>

<mask token>
for i in list:
    for j in i:
        if j.isalpha():
            if j.isupper():
                countU += 1
            else:
                countL += 1
print('UPPER CASE %d' % countU)
print('LOWER CASE %d' % countL)

n = input()
list = n.split(' ')
countU = 0
countL = 0
for i in list:
    for j in i:
        if j.isalpha():
            if j.isupper():
                countU += 1
            else:
                countL += 1
print('UPPER CASE %d' % countU)
print('LOWER CASE %d' % countL)



n = input()

list = n.split(" ")

countU=0
countL=0



for i in list:
    for j in i:
        if(j.isalpha()):
            if j.isupper():
                countU+=1
            else:
                countL+=1


print("UPPER CASE %d"%countU)
print("LOWER CASE %d"%countL)




