CF 59A
#include<iostream>
#include<string>
using namespace std;
int main(){
string s;
while(cin>>s){
int low=0,up=0;
for(int i=0;i<s.length();++i){
if(s[i]>=65&&s[i]<=90) ++up;
else if(s[i]>=97&&s[i]<=122) ++low;
}
if(low>=up){
for(int i=0;i<s.length();++i){
if(s[i]>=65&&s[i]<=90)
s[i]+=32;
}
}
else{
for(int i=0;i<s.length();++i){
if(s[i]>=97&&s[i]<=122)
s[i]-=32;
}
}
cout<<s<<'\n';
}
return 0;
}