#include <bits/stdc++.h>
using namespace std;
int main() {
int male, duze;
string slowo;
cin >> slowo;
male=0;
duze=0;
for(int i=0;i<slowo.length();i++)
if(slowo[i]<='Z')
++duze;
else if(slowo[i]>='A')
++male;
if(duze>male) {
for(int i=0;i<slowo.length();i++)
if(int (slowo[i])>=97)
slowo[i]=slowo[i]-32;
}
else
{
for(int i=0;i<slowo.length();i++)
if(int (slowo[i])<=90)
slowo[i]=slowo[i]+32;
}
cout<<slowo;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiAKaW50IG1haW4oKSB7CiAKIAoJaW50IG1hbGUsIGR1emU7CglzdHJpbmcgc2xvd287CgljaW4gPj4gc2xvd287CgltYWxlPTA7CglkdXplPTA7CgkKCWZvcihpbnQgaT0wO2k8c2xvd28ubGVuZ3RoKCk7aSsrKQoJCgkJaWYoc2xvd29baV08PSdaJykKCSsrZHV6ZTsKCWVsc2UgaWYoc2xvd29baV0+PSdBJykKCSsrbWFsZTsKCQogCglpZihkdXplPm1hbGUpIHsKCWZvcihpbnQgaT0wO2k8c2xvd28ubGVuZ3RoKCk7aSsrKQoKCWlmKGludCAoc2xvd29baV0pPj05NykKCXNsb3dvW2ldPXNsb3dvW2ldLTMyOwoJfQoJZWxzZQoJewoJZm9yKGludCBpPTA7aTxzbG93by5sZW5ndGgoKTtpKyspCglpZihpbnQgKHNsb3dvW2ldKTw9OTApCgkJc2xvd29baV09c2xvd29baV0rMzI7Cgl9CiAKIAogCgljb3V0PDxzbG93bzsKIAogCiAKCXJldHVybiAwOwp9