# Arup Guha
# 3/18/2025
# Solution to 2025 UCF HSPT Problem: Last Slime Standing

# Runs a binary search on the sorted list of values and returns the smallest
# value that can win the game.
def binsearchval(sortedvals):

    # Store cumulative frequency array here.
    n = len(sortedvals)
    cumfreq = [0]
    for i in range(n):
        cumfreq.append(cumfreq[-1]+sortedvals[i])
    
    # Set up binary search.
    lo = 0
    hi = n-1

    # Binary search first index that wins
    while lo < hi:

        # Try this index.
        mid = (lo + hi)//2

        # I can eat everything before me.
        cureat = cumfreq[mid]

        # My new size.
        cursize = sortedvals[mid] + cureat

        # Next index to eat
        curIdx = mid+1

        # Keep eating above me until I get stuck.
        while curIdx < n and cursize >= sortedvals[curIdx]:

            # Eat!
            cursize += sortedvals[curIdx]

            # Go to next.
            curIdx += 1

        # If we ate everything, then answer is no higher than mid.
        if curIdx == n:
            hi = mid

        # Answer is mid+1 or greater.
        else:
            lo = mid+1

    # This is our target value.
    return sortedvals[lo]
        

def main():

    n = int(input())

    # Store originally.
    vals = [int(x) for x in input().split()]

    # And sorted version.
    svals = []
    for x in vals:
        svals.append(x)
    svals.sort()

    # Get smallest winning answer.
    minval = binsearchval(svals)

    # If number is big enough it's a win, otherwise a loss.
    for i in range(n):
        if vals[i]>= minval:
            print("W", end="")
        else:
            print("L", end="")

# Run it.
main()
