#include <bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
int len = s.length(), upper = 0, lower = 0;
for (int i = 0; i < len; i++)
{
if (isupper(s[i]))
upper++;
else if (islower(s[i]))
lower++;
}
if (upper > lower)
for (int i = 0; i < len; i++)
cout << (char)toupper(s[i]);
else
for (int i = 0; i < len; i++)
cout << (char)tolower(s[i]);
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpCnsKICAgIGlvc19iYXNlOjpzeW5jX3dpdGhfc3RkaW8oZmFsc2UpOwogICAgY2luLnRpZSgwKTsKCiAgICBzdHJpbmcgczsKICAgIGNpbiA+PiBzOwoKICAgIGludCBsZW4gPSBzLmxlbmd0aCgpLCB1cHBlciA9IDAsIGxvd2VyID0gMDsKCiAgICBmb3IgKGludCBpID0gMDsgaSA8IGxlbjsgaSsrKQogICAgewogICAgICAgIGlmIChpc3VwcGVyKHNbaV0pKQogICAgICAgICAgICB1cHBlcisrOwogICAgICAgIGVsc2UgaWYgKGlzbG93ZXIoc1tpXSkpCiAgICAgICAgICAgIGxvd2VyKys7CiAgICB9CgogICAgaWYgKHVwcGVyID4gbG93ZXIpCiAgICAgICAgZm9yIChpbnQgaSA9IDA7IGkgPCBsZW47IGkrKykKICAgICAgICAgICAgY291dCA8PCAoY2hhcil0b3VwcGVyKHNbaV0pOwogICAgZWxzZQogICAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgbGVuOyBpKyspCiAgICAgICAgICAgIGNvdXQgPDwgKGNoYXIpdG9sb3dlcihzW2ldKTsKfQ==