Problem: Vasya is very upset that many people on the Net mix uppercase and lowercase letters in one word. That's why he decided to invent an extension for his favorite browser that would change the letters' register in every word so that it either only consisted of lowercase letters or, vice versa, only of uppercase ones. At that as little as possible letters should be changed in the word. For example, the word HoUse must be replaced with house, and the word ViP — with VIP. If a word contains an equal number of uppercase and lowercase letters, you should replace all the letters with lowercase ones. For example, maTRIx should be replaced by matrix. Your task is to use the given method on one given word.

Input

The first line contains a word s — it consists of uppercase and lowercase Latin letters and possesses the length from 1 to 100.

Output

Print the corrected word s. If the given word s has strictly more uppercase letters, make the word written in the uppercase register, otherwise - in the lowercase one.

Examples

Input

HoUse


Output

house


Input

ViP


Output

VIP


Input

maTRIx


Output

matrix

Solution (in PYTHON3):

Solution:
# # '''def binarysearch(arr,e):
# #    high = len(arr)-1
# #    low = 0
# #    while high >low:
# #       print("int")
# #       mid= (high+low)//2
# #       if mid==e:
# #          return True
# #       elif mid<e:
# #          low = mid+1
# #       elif mid>e:
# #          high =mid-1
# #    return False
# # ar = list(map(int, input().split()))
# # e = int(input())
# # print(binarysearch(ar, e))

# # def binary_search(item_list,item):
# # 	first = 0
# # 	last = len(item_list)-1
# # 	found = False
# # 	while( first<=last and not found):
# # 		mid = (first + last)//2
# # 		if item_list[mid] == item :
# # 			found = True
# # 		else:
# # 			if item < item_list[mid]:
# # 				last = mid - 1
# # 			else:
# # 				first = mid + 1	
# # 	return found'''



# # # def cow():
# # # 	N ,c =map(int, input().split())
# # # 	positionarry =[]
# # # 	temarry = []
# # # 	for i in range(N):
# # # 		d = int(input())
# # # 		temarry.append(d)
# # # 	arry =[True]*temarry[len(temarry)-1]
# # # 	for i in temarry:
# # # 		arry[i-1]=False
# # # 	checkvalue = temarry[len(temarry)-1]//c
# # # 	while checkvalue>0:
# # # 		n=0
# # # 		while n<len(arry):
# # # 			if c<1:
# # # 				p = temarry[len(temarry)-1]
# # # 				for h in range(len(positionarry)-1):
# # # 					if (positionarry[h+1]-positionarry[h])<p:
# # # 						p=positionarry[h+1]-positionarry[h]
# # # 				return p
# # # 			if arry[n]==False:
# # # 				arry[n]="cow"
# # # 				positionarry.append(n+1)
# # # 				n+=checkvalue
# # # 				c-=1
# # # 			else:
# # # 				n+=1
# # # 		if c!=0:
# # # 			checkvalue-=1
# # # 	return 0
# # # print(cow())


# # # def binary_search():
# # # 	arry = list(map(int, input().split()))
# # # 	element = int(input())
# # # 	l =0
# # # 	high = len(arry)-1
# # # 	while l<high:
# # # 		mid = l+((high-l)//2)
# # # 		if arry[mid] == element:
# # # 			return mid+1
# # # 		elif arry[mid]<element:
# # # 			l = mid+1
# # # 		else:
# # # 			high = mid-1
# # # 	return False
# # # print(binary_search())
# # # testcases = int(input())
# # # temolist = []
# # # answe = []
# # # for i in range(testcases):
# # # 	user = int(input())
# # # 	temolist.append(user)
# # # newlist = sorted(temolist)
# # # revanew = 0
# # # for i in newlist[len(newlist)//2:0:-1]:
# # # 	addd= 0
# # # 	for j in newlist:
# # # 		if j>=i:
# # # 			addd+=1
# # # 	new =addd*i
# # # 	if new>=revanew:
# # # 		revanew = new
# # # print(revanew)
# # # testcase = int(input())
# # # answer = []
# # # for i in range(testcase):
# # # 	n = int(input())
# # # 	ls = list(map(int, input().split()))
# # # 	count = 0
# # # 	speed=ls[0]
# # # 	for j in ls:
# # # 		if j<=speed:
# # # 			count+=1
# # # 			speed =j
# # # 	answer.append(count)
# # # for k in answer:
# # # 	print(k)
# # # test_cases = int(input())
# # # for p in range(test_cases):
# # #     n = int(input())
# # #     k = 5
# # #     ans = 0
# # #     while k<=n:       
# # #         ans+=(n//k)
# # #         k*=5
# # #     print(ans)	

# # # def coinflip():
# # # 	testcases = int(input())
# # # 	ans =[]
# # # 	g = int(input())
# # # 	for game in range(g):
# # # 		arry = list(map(int, input().split()))
			
# # # 		if arry[1]%2==0:
# # # 			coin = arry[1]//2
# # # 			ans.append(coin)
# # # 		else:
# # # 			coin = (arry[1]//2)+1
# # # 			if arry[0]==1 and arry[2]==1:
# # # 				ans.append(coin-1)
# # # 			else:
# # # 				ans.append(coin)
# # # 	for h in ans:
# # # 		print(h)
# # # coinflip()

# # ''' python 2 '''
# # # for cas in xrange(input()):
# # #     n, origin = raw_input().strip().split()
# # #     points = 0
# # #     for i in xrange(int(n)):
# # #         data = raw_input().strip().split()
# # #         kind = data[0]
# # #         if kind == 'CONTEST_WON':
# # #             rank = int(data[1])
# # #             bonus = max(0, 20 - rank)
# # #             points += 300 + bonus
# # #         elif kind == 'TOP_CONTRIBUTOR':
# # #             points += 300
# # #         elif kind == 'BUG_FOUND':
# # #             severity = int(data[1])
# # #             points += severity
# # #         elif kind == 'CONTEST_HOSTED':
# # #             points += 50

# # #     print points / (200 if origin == 'INDIAN' else 400)

# # # f=[2,4,8,6]
# # # for _ in range(int(input())):
# # #     p=0
# # #     s=0
# # #     k,d0,d1=list(map(int,input().split()))
# # #     for i in f:
# # #         p=p+((i*(d0+d1))%10)
# # #     print(f"p is :{p}")
# # #     if k>2:
# # #         u=k-3
# # #         d=u//4
# # #         r=u-(d*4)
# # #         print(f" r is : {r}")
# # #         s=d0+d1+((d0+d1)%10)+(p*d)
# # #         i=0
# # #         while(i<r):
# # #             print(f"value of s is: {s}")  
# # #             s=s+((f[i]*(d0+d1)))%10
# # #             i=i+1
# # #     elif k==2:
# # #         s=d0+d1
# # #     if s%3==0:
# # #         print("YES")
# # #     else:
# # #         print("NO")
# # # a ={1,2,4,5}
# # # b = {2,5,8}
# # # print(a-(a&b))



# # #     print(pow(2,3))
# # # a = True
# # # sum = 1
# # # n= 5
# # # count =0
# # # while a:
# # #     sf = sum*(sum+1)/2
# # #     if sf >n:
# # #         print(count)
# # #         break
# # #     else:
# # #         count+=1
# # #         sum+=1

# # import time


# # # LH  = int(input().strip())
# # # UH  = int(input().strip())
# # # LW  = int(input().strip())
# # # UW  = int(input().strip())
# # # dct = {}
# # start_time = time.time()
# # # max_len = 0
# # # count = 0
# # # def f(x,y):
# # #   global count, max_len
# # #   count += 1
# # #   if x<y:
# # #     x, y = y,x
# # #   if x==0 or y==0:
# # #     return 0
# # #   if x==y:
# # #     return 1
# # #   else:
# # #     #return 1+f(x-y,y)
# # #     #'''
# # #     if (x,y) not in dct:
# # #       dct[(x,y)] = 1+f(x-y,y)
# # #       if len(dct)>max_len: max_len = len(dct)
# # #       if ((x-y,y) in dct): del dct[(x-y,y)]
# # #     return dct[(x,y)]
# # #     #'''
# # # res = 0
# # # for i in range(LH,UH+1):
# # #   for j in range(LW,UW+1):
# # #     res += f(i,j)
# # # print(res)
# # # Python program to compute factorial 
# # # of big numbers 
  
# # # import sys 

# # # def factorial( n) : 
# # #     res = [None]*1000

# # #     res[0] = 1
# # #     res_size = 1
# # #     x = 2
# # #     while x <= n : 
# # #         res_size = multiply(x, res, res_size) 
# # #         x = x + 1
      
# # #     print ("Factorial of given number is") 
# # #     i = res_size-1
# # #     while i >= 0 : 
# # #         sys.stdout.write(str(res[i])) 
# # #         sys.stdout.flush() 
# # #         i = i - 1

# # # def multiply(x, res,res_size) :
# # #     carry = 0
# # #     i = 0
# # #     while i < res_size : 
# # #         prod = res[i] *x + carry 
# # #         res[i] = prod % 10; 
# # #         carry = prod//10; 
# # #         i = i + 1
# # #     while (carry) : 
# # #         res[res_size] = carry % 10 
# # #         carry = carry // 10
# # #         res_size = res_size + 1
          
# # #     return res_size
# # # factorial(100) 
# # # print("--- %s seconds ---" % (time.time() - start_time))

# # l, b = map(int, input().split())
# # for i in range(min(l,b),1,-1):
# #     if max(l,b)%i==0:
# #         print(max(l,b)/i)


# #'''parnthiese '''
# # def  parnthisis():
# #    user = input()
# #    ls =[]
# #    for i in user:
# #       if i =="{":
# #          ls.append("{")
# #       if i =="(":
# #          ls.append("(")
# #       if i== "[":
# #          ls.append("[")
# #       if len(ls)>=1:
# #          if i=="}":
# #             if ls[len(ls)-1]=="{":
# #                ls.pop()
# #             else:
# #                return False
# #          if i==")":
# #             if ls[len(ls)-1]=="(":
# #                ls.pop()
# #             else:
# #                return False      
# #          if i=="]":
# #             if ls[len(ls)-1]=="[":
# #                ls.pop()
# #             else:
# #                return False
# #       else:
# #          return False
# #    if len(ls)>0:
# #       return False
# #    else:
# #       return True
# # print(parnthisis())
# # def choices():
# #    arry =["1.Check Set is Empty.","2.Check Whether Set is Equal.","3.Check Whether Set is Finite or Infinite.","4.Check Whether Given Set is Subset","5.Find Difference with Set","6.Check Whether SuperSet."]
# #    for i in arry:
# #       print(i)
# #    return arry
# # ls = {1,2,3}
# # ls2 = {5,4,8}
# # car = [{i,j}for i in ls for j in ls2]
# # print(car)
# # def setfuntion():
# #   # arry= ["unionset","superset","subset","inertsection"]
# #    print("Enter Set1 Elemens")
# #    set1 = set(map(int, input().split()))
# #    print(f"set is :{set1}\n")
# #    run = True
# #    while  run:
# #       choices()
# #       option = int(input("Enter your option:"))
# #       if option == 1:
# #          print("Empty..!"if len(set1)==0 else"Not Empty..!")
# #       elif option== 2:
# #          print("Enter Set 2:")
# #          set2 = set(map(int, input().split()))
# #          print("Equal set"if set1== set2 else " Not Equal")
# #       elif option == 3:
# #          print("Finite")
# #       elif option== 4:
# #          print("Enter Set 2:")
# #          set2 = set(map(int, input().split()))
# #          print("Yes"if set2.issubset(set1) else "No")
# #       elif option ==5:
# #          print("Enter set 2:")
# #          set2 = set(map(int, input().split()))
# #          print("Set diff is :",set1.difference(set2))
# #       elif option == 6:
# #          print("Entet set 2:")
# #          set2 = set(map(int, input().split()))
# #          print("Yes"if set2.issuperset(set1)else "No")
# #       else:
# #          print("Please Select Valid Option !")
# #       print("Do Want To Continue(y/n)")
# #       user = input()
# #       if user.lower()== "y":
# #          run =True
# #       else:
# #          run = False
         
# #    else:
# #       pass
# #    choices()
#    # print("Enter Your 1st Set : ")
#    # set1=set(map(int, input().split()))
   
# # summ1, summ2, summ3 =0,0,0
# # for tests in range(int(input())):
# #    v1 = list(map(int,input().split()))
# #    summ1 += v1[0]
# #    summ2 +=v1[1]
# #    summ3 +=v1[2]
# # if summ1==0 and summ2 ==0 and summ3==0:
# #    print("YES")
# # else: 
# #    print("NO")
# # setfuntion()

# arr=[]
# for i in range(5):
#    a = list(map(int, input().split()))
#    arr.append(a)

# for i in range(5):
#    for j in range(6):
#       print(arr[i][j], end=" ")
#    print()
s =input()
u=0
l=0
for i in s:
	if i.isupper():
		u+=1
	else:
		l+=1
if u>l:
	print(s.upper())
elif l>u:
	print(s.lower())
else:
	print(s.lower())