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 JAVA):

Solution:

import java.util.*;
import java.io.*;
public class CodeChef {

	public static void main(String[] args) {
		FastReader in = new FastReader() ;
		String s = in.nextLine();
		int count =0;
		for(int i =0;i<s.length();i++) {
			int x = s.charAt(i);
			if(x<=90)
				count++;
		}
		
		 if(count<=s.length()/2)
			 System.out.println(s.toLowerCase());
		 else 
			 System.out.println(s.toUpperCase());
		
	 }
	

static class FastReader
	  {
	        BufferedReader br;
	        StringTokenizer st;
	 
	        public FastReader()
	        {
	            br = new BufferedReader(new
	                    InputStreamReader(System.in));
	        }
	 
	        String next()
	        {
	            while (st == null || !st.hasMoreElements())
	            {
	                try
	                {
	                    st = new StringTokenizer(br.readLine());
	                }
	                catch (IOException  e)
	                {
	                    e.printStackTrace();
	                }
	            }
	            return st.nextToken();
	        }
	        int nextInt()
	        {
	            return Integer.parseInt(next());
	        }
	 
	        long nextLong()
	        {
	            return Long.parseLong(next());
	        }
	 
	        double nextDouble()
	        {
	            return Double.parseDouble(next());
	        }
	        String nextLine()
	        {
	            String str = "";
	            try
	            {
	                str = br.readLine();
	            }
	            catch (IOException e)
	            {
	                e.printStackTrace();
	            }
	            return str;
	        }
	 
	        int [] readintarray(int n) {
	            int res [] = new int [n];
	            for(int i = 0; i<n; i++)res[i] = nextInt();
	            return res;
	        }
	        long [] readlongarray(int n) {
	            long res [] = new long [n];
	            for(int i = 0; i<n; i++)res[i] = nextLong();
	            return res;
	        }
	  }
    static boolean isPrime(int n)
    {

    // Check if number is less than
    // equal to 1
     if (n <= 1)
         return false;

    // Check if number is 2
     else if (n == 2)
         return true;

    // Check if n is a multiple of 2
     else if (n % 2 == 0)
         return false;

    // If not, then just check the odds
     for (int i = 3; i <= Math.sqrt(n); i += 2)
     {
        if (n % i == 0)
            return false;
     }
     return true;
    }

   static int getSum(int n)
   {    
       int sum = 0;
       
       while (n != 0)
      {
         sum = sum + n % 10;
         n = n/10;
      }
  
    return sum;
   }

    static int gcd(int a, int b)
   {
    // Everything divides 0
    if (a == 0)
      return b;
    if (b == 0)
      return a;
  
    // base case
    if (a == b)
        return a;
  
    // a is greater
    if (a > b)
        return gcd(a-b, b);
    return gcd(a, b-a);
   }

     static void swap(int[] arr, int i, int j)
    {
       int temp = arr[i];
       arr[i] = arr[j];
       arr[j] = temp;
    }

    static int countDigit(long n)
    {
        return (int)Math.floor(Math.log10(n) + 1);
    }
    static long fastpower(long a,long b,int n ) {
    	long res =1;
    	while(b>0) {
    		if((b&1)!=0) {
    			res = (res* a % n)%n;
    		}
    		a = (a % n*a % n) % n;
    		b = b >> 1;
	            
    	}
    	return res;
    }
    static int catalan(int n)
    {
        int res = 0;
 
        // Base case
        if (n <= 1)
        {
            return 1;
        }
        for (int i = 0; i < n; i++)
        {
            res += catalan(i)
                * catalan(n - i - 1);
        }
        return res;
    }
    static int mod(int a, int m)
    {
        return (a%m + m) % m;
    }
}