Pasha has many hamsters and he makes them work out. Today, n hamsters (n is even) came to work out. The hamsters lined up and each hamster either sat down or stood up.

For another exercise, Pasha needs exactly <image> hamsters to stand up and the other hamsters to sit down. In one minute, Pasha can make some hamster ether sit down or stand up. How many minutes will he need to get what he wants if he acts optimally well?

Input

The first line contains integer n (2 ≤ n ≤ 200; n is even). The next line contains n characters without spaces. These characters describe the hamsters' position: the i-th character equals 'X', if the i-th hamster in the row is standing, and 'x', if he is sitting.

Output

In the first line, print a single integer — the minimum required number of minutes. In the second line, print a string that describes the hamsters' position after Pasha makes the required changes. If there are multiple optimal positions, print any of them.

Examples

Input

4
xxXx


Output

1
XxXx


Input

2
XX


Output

1
xX


Input

6
xXXxXx


Output

0
xXXxXx
def change_hamster_positions(hamster_positions, dominant_position,
                             passive_position, num_changes_required):
    """
    helper function for equalize_hamster_positions that changes hamster
    positions from that of the dominant position to the passive position a
    number of times such that both positions are occupied in equal number

    Inputs:
    hamster_positions: <list>
    Contains the positions of all of Pasha's hamsters as they get ready for
    their next exercise

    dominant_position: <str>
    Contains the dominant position, "X" or "x"

    passive_position: <str>
    Contains the passive position, "x" or "X"

    num_changes: <int>
    Contains the required number of positional changes so that an equal
    number of hamsters are in either position

    Output:
    hamster_positions : <str>
    Contains the updated positions of the hamsters such that the standing and
    sitting positions are occupied in equal number
    """
    num_positional_changes = 0
    for index in range(len(hamster_positions)):
        if num_positional_changes < num_changes_required:
            # Find first occurrences of hamsters in dominant position and
            # have them revert to passive position until positions are
            # occupied in equal number
            if hamster_positions[index] == dominant_position:
                hamster_positions[index] = passive_position
                num_positional_changes += 1


    return "".join(hamster_positions)

def equalize_hamster_positions(num_hamsters, hamster_positions):
    """
    Pasha has many hamsters and he makes them work out. Today, n hamsters
    ( n is even) came to work out. The hamsters lined up and each hamster
    either sat down or stood up.

    For another exercise, Pasha needs exactly n/2 hamsters to stand up and the
    other n/2 hamsters to sit down. In one minute, Pasha can change the
    position of one hamster. How many minutes will he need to get what he wants
    if he acts optimally?

    Inputs:
    num_hamsters: <int>
    Contains an integer n (2 ≤ n ≤ 200; n is even) that represents the number of
    hamsters working out.

    hamster_positions <str>
    The next line  contains n characters without spaces. These characters
    describe the hamsters' position: the i-th character equals 'X', if the
    i-th hamster in the row is standing, and 'x', if he is sitting.

    Output
    In the first line, print a single integer — the minimum required number
    of minutes.

    In the second line, print a string that describes the hamsters' position
    after Pasha makes the required changes. If there are multiple optimal
    positions, print any of them.
    """
    # Need to have equal numbers of hamsters standing up and sitting down
    # To resolve, find the number of hamsters in each position, determine
    # the dominant position, 'X' or 'x', and have (N1 - N2)/2 hamsters in the
    # dominant position change to the less dominant position.
    num_hamsters_standing = hamster_positions.count("X")
    num_hamsters_sitting = hamster_positions.count("x")

    # Check for case when equal numbers of hamsters are in the sitting and
    # standing positions. In this case, we don't have to do anything except
    # print some stuff
    if num_hamsters_standing == num_hamsters_sitting:
        print(0)
        print(hamster_positions)
        return 0

    # In case where position of hamsters are not in equal number
    # Compute number of required positional changes to have equal number of
    # hamsters in sitting and standing positions
    num_changes_required = abs(num_hamsters_standing - num_hamsters_sitting) \
                           // 2

    # Convert hamster_positions from <str> to <list> since <str> objects are
    # immutable, and therefore cannot be modified
    hamster_positions = list(map(str, hamster_positions))
    # Check for case when standing is dominant position
    if num_hamsters_standing > num_hamsters_sitting:
        dominant_position = "X"
        passive_position = "x"
        hamster_positions_new = \
            change_hamster_positions(hamster_positions, dominant_position,
                                     passive_position, num_changes_required)


    if num_hamsters_sitting > num_hamsters_standing:
        dominant_position = "x"
        passive_position = "X"
        hamster_positions_new = \
            change_hamster_positions(hamster_positions, dominant_position,
                                     passive_position, num_changes_required)

    print(num_changes_required)
    print(hamster_positions_new)


num_hamsters_user = int(input())
hamster_positions_user = input()
equalize_hamster_positions(num_hamsters_user, hamster_positions_user)

# Examples
# inputCopy
# 4
# xxXx
# outputCopy
# 1
# XxXx
# inputCopy
# 2
# XX
# outputCopy
# 1
# xX
# inputCopy
# 6
# xXXxXx
# outputCopy
# 0
# xXXxXx