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:
# # №1.1 Буква в слове
# a = input()
# s = list(input().split())
# l = len(s)
# for i in range(l):
#     if a in s[i]:
#         print(s[i])

# # №1.2 Максимальное кол-во букв в слове
# a = input().lower()
# max_c = 0
# for i in a:
#     if a.count(i) >= max_c:
#         max_c = a.count(i)
# print(max_c)

# # №1.3  Удалить каждый третий символ
# a = input()
# l = len(a)
# b = ''
# for i in range(l):
#     if i != 0 and i % 3 != 0:
#         b = b + a[i]
# print(b)

# # №1.4 Полицейские-рекруты
# c = int(input())
# h = list(map(int, input().split()))
# p_count = 0
# out = 0
# for i in h:
#     if i == -1:
#         if p_count == 0:
#             out += 1
#         else:
#             p_count -= 1
#     if 1 <= i <= 10:
#         p_count += i
# print(out)
# https://codeforces.com/problemset/problem/427/A

# # №1.5 A. I_love_%username%
# c = int(input())
# h = list(map(int, input().split()))
# count = 0
# min = h[0]
# max = h[0]
# for i in range(c):
#     if h[i] > max:
#         max = h[i]
#         count += 1
#     elif h[i] < min:
#         min = h[i]
#         count += 1
# print(count)
# https://codeforces.com/problemset/problem/155/A

# # №1.5 A. Следующий раунд
# n, k = map(int, input().split())
# h = list(map(int, input().split()))
# count = 0
# for i in range(n):
#     if h[i] >= h[k-1] and h[i] > 0:
#         count += 1
# print(count)
# https://codeforces.com/problemset/problem/158/A

# # №1.5.1 A. Праздник равенства
# n = int(input())
# h = list(map(int, input().split()))
# max_h = max(h)
# count = 0
# for i in range(n):
#     if h[i] < max_h:
#         r = max_h - h[i]
#         count += r
# print(count)
# https://codeforces.com/problemset/problem/758/A

# # №1.6 Тренировки Егора
# n = int(input())
# a = list(map(int, input().split()))
# count_chest = 0
# count_biceps = 0
# count_back = 0
# for i in range(n):
#     if i % 3 == 0:
#         count_chest += a[i]
#     elif i % 3 == 1:
#         count_biceps += a[i]
#     elif i % 3 == 2:
#         count_back += a[i]
#     else:
#         print('что то не так')
# if count_chest > count_biceps and count_chest > count_back:
#     print('chest')
# elif count_biceps > count_chest and count_biceps > count_back:
#     print('biceps')
# elif count_back > count_chest and count_back > count_biceps:
#     print('back')
# else:
#     print('сбой снова')
# https://codeforces.com/problemset/problem/255/A

# # №1.7 Упражнение на строки
# s = input().lower()
# glas = 'aoyeui'
# for i in glas:
#     s = s.replace(i,'')
# s = '.'.join(s)
# print('.' + s)
# https://codeforces.com/problemset/problem/118/A

# # №1.8 A. Не смешите мои подковы
# a = list(map(int, input().split()))
# count = 0
# while a:
#     c = a[0]
#     b = a.count(c)
#     count += b - 1
#     a.remove(c)
#     while c in a:
#         a.remove(c)
# print(count)
# # https://codeforces.com/problemset/problem/228/A

# # №1.9 B. Напитки
# c = int(input())
# h = list(map(int, input().split()))
# print(sum(h) / c)
# https://codeforces.com/problemset/problem/200/B

# # №1.10 A. Выбор команд
# n, k = map(int, input().split())
# y = list(map(int, input().split()))
# count = 0
# kom = 0
# for i in y:
#     if i <= 5 - k:
#         kom += 1
#     if kom == 3:
#         count += 1
#         kom = 0
# print(count)
# # https://codeforces.com/problemset/problem/432/A


# # №1.11 Decompress Run-Length Encoded List
# nums = list(map(int, input().split()))
# b = []
# len_nums = len(nums)
# eats = 0
# for i in range(1, len_nums, 2):
#     eats = nums[i]
#     for j in range(nums[i-1]):
#         b.append(eats)
# print(b)
# # https://leetcode.com/problems/decompress-run-length-encoded-list/

# # №1.12 A. Быстрый математик
# a = input()
# b = input()
# len_a = len(str(a))
# c = str(int(a) + int(b))
# while len(c) < len_a:
#     c = '0' + c
# # print(c, len(c), len_a)
# len_c = len(c)
# # print(c)
# for i in range(len_c):
#     if c[i] == '2':
#         c = c.replace(c[i], '0')
# # print(len(c), len_c)
# while len(c) < len_a:
#     c = '0' + c
# print(c)
# https://codeforces.com/problemset/problem/61/A

# №1.13 A. Ваня и забор
# n, h = map(int, input().split())
# a = list(map(int, input().split()))
# width = 0
# for i in range(n):
#     if a[i] <= h:
#         width += 1
#     else:
#         width += 2
# print(width)
# https://codeforces.com/problemset/problem/677/A

# №1.14 A. Башни
# N = int(input())
# L = list(map(int, input().split()))
# max_count = 0
# tower = []
# for i in range(N):
#     if L[i] not in tower:
#         tower.append(L[i])
#         if L.count(L[i]) > max_count:
#             max_count = L.count(L[i])
# print(max_count, len(tower))
# https://codeforces.com/problemset/problem/37/A

# №1.15 A. Антон и Даник
# N = int(input())
# s = input()
# if s.count('A') > s.count('D'):
#     print('Anton')
# elif s.count('A') < s.count('D'):
#     print('Danik')
# else:
#     print('Friendship')
# # https://codeforces.com/problemset/problem/734/A

# №1.16 A. Свободная касса
# N = int(input())
# h = []
# m = []
# count = 1
# max_count = 1
# for i in range(N):
#     H, M = map(int, input().split())
#     h.append(H)
#     m.append(M)
#     if i == 0:
#         count = 1
#     elif h[i] == h[i-1] and m[i] == m[i-1]:
#         count += 1
#         if count > max_count:
#             max_count = count
#     elif h[i] != h[i-1] or m[i] != m[i-1]:
#         count = 1
# print(max_count)
# https://codeforces.com/problemset/problem/237/A

# №1.17 A. Слово
A = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
B = 'abcdefghijklmnopqrstuvwxyz'
s = input()
up_count = 0
low_count = 0
for i in s:
    if i in A:
        up_count += 1
    elif i in B:
        low_count += 1
if up_count > low_count:
    print(s.upper())
else:
    print(s.lower())
# https://codeforces.com/problemset/problem/59/A