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.
The first line contains a word *s* — it consists of uppercase and lowercase Latin letters and possesses the length from 1 to 100.
from collections import deque, defaultdict, Counter, OrderedDict
from itertools import product, groupby, permutations, combinations, accumulate, zip_longest, \
    combinations_with_replacement
from math import gcd, floor, inf, log2, sqrt, log10, factorial
from bisect import bisect_right, bisect_left, insort_left
from statistics import mode
from string import ascii_lowercase, ascii_uppercase
from heapq import heapify, heappop, heappush, heappushpop, heapreplace, nlargest, nsmallest, merge
from copy import deepcopy  # must be used in copying list of list etc..(for multi level)
from random import shuffle, randint
import random
from operator import xor, or_
from typing import List

s = input()

up = sum(1 for char in s if char.isupper())

low = sum(1 for char in s if char.islower())

if up > low:
    print(s.upper())
else:
    print(s.lower())

