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
import java.awt.Point;
import java.io.*;
import java.math.BigInteger;
import java.util.*;

import static java.lang.Math.*;

public class Testt {

	final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
	BufferedReader in;
	PrintWriter out;
	StringTokenizer tok = new StringTokenizer("");

	void init() throws FileNotFoundException {
		if (ONLINE_JUDGE) {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
		} else {
			in = new BufferedReader(new FileReader("input.txt"));
			out = new PrintWriter("output.txt");
		}
	}

	String readString() throws IOException {
		while (!tok.hasMoreTokens()) {
			tok = new StringTokenizer(in.readLine());
		}
		return tok.nextToken();
	}

	int readInt() throws IOException {
		return Integer.parseInt(readString());
	}

	long readLong() throws IOException {
		return Long.parseLong(readString());
	}

	double readDouble() throws IOException {
		return Double.parseDouble(readString());
	}


    public static void mergeSort(int[] a) {
            mergeSort(a, 0, a.length - 1);
    }

    private static void mergeSort(int[] a, int leftIndex, int rightIndex) {
            final int MAGIC_VALUE = 50;
            if (leftIndex < rightIndex) {
                    if (rightIndex - leftIndex <= MAGIC_VALUE) {
                            insertionSort(a, leftIndex, rightIndex);
                    } else {
                            int middleIndex = (leftIndex + rightIndex) / 2;
                            mergeSort(a, leftIndex, middleIndex);
                            mergeSort(a, middleIndex + 1, rightIndex);
                            merge(a, leftIndex, middleIndex, rightIndex);
                    }
            }
    }

    private static void merge(int[] a, int leftIndex, int middleIndex, int rightIndex) {
            int length1 = middleIndex - leftIndex + 1;
            int length2 = rightIndex - middleIndex;
            int[] leftArray = new int[length1];
            int[] rightArray = new int[length2];
            System.arraycopy(a, leftIndex, leftArray, 0, length1);
            System.arraycopy(a, middleIndex + 1, rightArray, 0, length2);
            for (int k = leftIndex, i = 0, j = 0; k <= rightIndex; k++) {
                    if (i == length1) {
                            a[k] = rightArray[j++];
                    } else if (j == length2) {
                            a[k] = leftArray[i++];
                    } else {
                            a[k] = leftArray[i] <= rightArray[j] ? leftArray[i++] : rightArray[j++];
                    }
            }
    }

    private static void insertionSort(int[] a, int leftIndex, int rightIndex) {
            for (int i = leftIndex + 1; i <= rightIndex; i++) {
                    int current = a[i];
                    int j = i - 1;
                    while (j >= leftIndex && a[j] > current) {
                            a[j + 1] = a[j];
                            j--;
                    }
                    a[j + 1] = current;
            }
    }
	
	public static void main(String[] args) {
		new Testt().run();
	}

	public void run() {
		try {
			long t1 = System.currentTimeMillis();
			init();
			solve();
			out.close();
			long t2 = System.currentTimeMillis();
			System.err.println("Time = " + (t2 - t1));
		} catch (Exception e) {
			e.printStackTrace(System.err);
			System.exit(-1);
		}
	}
	int mini=Integer.MAX_VALUE;
	int maxi=Integer.MIN_VALUE;
	int ans=0;
	int ans2=0;
	
	int  a [] [];
	int d [] [];
	
	void solve() throws IOException {
		 char c [] = in.readLine().toCharArray();
		 for (int i = 0 ; i <c.length; i++){
			 if (c[i]>='a' && c[i]<='z') ans++;
		 }
		 for (int i = 0 ; i <c.length; i++){
			 if (c[i]>='A' && c[i]<='Z') ans2++;
		 }
		 if (ans2>ans){
			 char l;
			 for (int i = 0; i <c.length; i++){
				 l = Character.toUpperCase(c[i]);
				 out.print(l);
			 }
			 
		 }
		 
		 else {
			 char l;
			 for (int i = 0; i <c.length; i++){
				 l = Character.toLowerCase(c[i]);
				 out.print(l);
			 }
		 }
	}
}





