Problem: The New Year is coming! That's why many people today are busy preparing New Year presents. Vasily the Programmer is no exception.

Vasily knows that the best present is (no, it's not a contest) money. He's put n empty wallets from left to right in a row and decided how much money to put in what wallet. Vasily decided to put ai coins to the i-th wallet from the left.

Vasily is a very busy man, so the money are sorted into the bags by his robot. Initially, the robot stands by the leftmost wallet in the row. The robot can follow instructions of three types: go to the wallet that is to the left of the current one (if such wallet exists), go to the wallet that is to the right of the current one (if such wallet exists), put a coin to the current wallet. Due to some technical malfunctions the robot cannot follow two "put a coin" instructions in a row.

Vasily doesn't want to wait for long, so he wants to write a program for the robot that contains at most 106 operations (not necessarily minimum in length) the robot can use to put coins into the wallets. Help him.

Input

The first line contains integer n (2 ≤ n ≤ 300) — the number of wallets. The next line contains n integers a1, a2, ..., an (0 ≤ ai ≤ 300).

It is guaranteed that at least one ai is positive.

Output

Print the sequence that consists of k (1 ≤ k ≤ 106) characters, each of them equals: "L", "R" or "P". Each character of the sequence is an instruction to the robot. Character "L" orders to move to the left, character "R" orders to move to the right, character "P" orders the robot to put a coin in the wallet. The robot is not allowed to go beyond the wallet line. In other words, you cannot give instructions "L" if the robot is at wallet 1, or "R" at wallet n.

As a result of the performed operations, the i-th wallet from the left must contain exactly ai coins. If there are multiple answers, you can print any of them.

Examples

Input

2
1 2


Output

PRPLRP

Input

4
0 2 0 2


Output

RPRRPLLPLRRRP

Solution (in JAVA):

Solution:
import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Solution {
    public static void main(String[] args) throws IOException {
//        InputStream inputStream = new FileInputStream().open();
//        OutputStream outputStream = new FileOutputStream().open();
        InputStream inputStream = new ConsoleInputStream().open();
        OutputStream outputStream = new ConsoleOutputStream().open();
        new Solution().run(inputStream, outputStream);
        outputStream.close();
        inputStream.close();
    }

    InputStream in;
    OutputStream out;

    protected void run(InputStream in, OutputStream out) throws IOException {
        this.in = in;
        this.out = out;

        int n = in.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = in.nextInt();
        }
        int c = 0;
        int ln0 = 0;
        StringBuilder ans = new StringBuilder();
        boolean lastP = false;
        while (true) {
            while (ln0 < n && a[ln0] == 0) {
                ln0++;
            }
            if (ln0 == n) {
                break;
            }
            while (c < ln0) {
                c++;
                ans.append('R');
            }
            while (c > ln0) {
                c--;
                ans.append('L');
            }
            while (a[c] != 0) {
                if (c + 1 < n) {
                    ans.append('R');
                    if (a[c + 1] > 0) {
                        a[c + 1]--;
                        ans.append('P');
                    }
                    ans.append('L');
                    ans.append('P');
                    a[c]--;
                } else {
                    ans.append('L');
                    if (a[c - 1] > 0) {
                        a[c - 1]--;
                        ans.append('P');
                    }
                    ans.append('R');
                    ans.append('P');
                    a[c]--;
                }
            }
        }
        out.println(ans.toString());
    }
}

// template beginning
// Author: Andrey Siunov
// Date: 29.08.2013

class FileInputStream extends InputStream {
    private String inputFileName;

    public FileInputStream() throws IOException {
        this("input.txt");
    }

    public FileInputStream(String inputFileName) throws IOException {
        this.inputFileName = inputFileName;
    }

    @Override
    protected Reader getReader() throws IOException {
        return new FileReader(inputFileName);
    }
}

class ConsoleInputStream extends InputStream {
    @Override
    protected Reader getReader() throws IOException {
        return new InputStreamReader(System.in);
    }
}

abstract class InputStream {
    private static String DELIMITERS = " \t\n\r\f";
    private BufferedReader in;

    public InputStream open() throws IOException {
        in = new BufferedReader(getReader());
        return this;
    }

    private class Line {
        private Line(String inputLine) {
            this.inputLine = inputLine;
            stringTokenizer = new StringTokenizer(this.inputLine, DELIMITERS);
            readCharacters = 0;
        }

        private int readCharacters;
        private String inputLine = null;
        private StringTokenizer stringTokenizer = null;

        public String nextToken() {
            String result = stringTokenizer.nextToken();
            readCharacters += result.length();
            return result;
        }

        boolean hasNextToken() {
            return stringTokenizer.hasMoreTokens();
        }

        String getLineRest() {
            int position = 0;
            for (int remain = readCharacters; remain > 0; position++) {
                if (DELIMITERS.indexOf(inputLine.charAt(position)) < 0) {
                    remain--;
                }
            }
            return inputLine.substring(position);
        }
    }

    private Line currentLine = null;

    abstract protected Reader getReader() throws IOException;

    /**
     * Note: may be incorrect behavior if use this method with hasNextToken method
     */
    public String nextLine() throws IOException {
        setInputLine();
        if (currentLine == null) {
            return null;
        }
        String result = currentLine.getLineRest();
        currentLine = null;
        return result;
    }

    public boolean hasNextLine() throws IOException {
        setInputLine();
        return currentLine != null;
    }

    public String nextToken() throws IOException {
        return hasNextToken() ? currentLine.nextToken() : null;
    }

    /**
     * Note: may be incorrect behavior if use this method with nextLine method
     */
    public boolean hasNextToken() throws IOException {
        while (true) {
            setInputLine();
            if (currentLine == null || currentLine.hasNextToken()) {
                break;
            } else {
                currentLine = null;
            }
        }
        return currentLine != null;
    }

    public int nextInt() throws IOException {
        return new Integer(this.nextToken());
    }

    public long nextLong() throws IOException {
        return new Long(this.nextToken());
    }

    public double nextDouble() throws IOException {
        return new Double(this.nextToken());
    }

    public BigInteger nextBigInteger() throws IOException {
        return new BigInteger(this.nextToken());
    }

    public void close() throws IOException {
        currentLine = null;
        in.close();
    }

    private void setInputLine() throws IOException {
        if (currentLine == null) {
            String line = in.readLine();
            if (line != null) {
                currentLine = new Line(line);
            }
        }
    }
}

class FileOutputStream extends OutputStream {
    private String outputFileName;

    public FileOutputStream() throws IOException {
        this("output.txt");
    }

    public FileOutputStream(String outputFileName) throws IOException {
        this.outputFileName = outputFileName;
    }

    @Override
    protected Writer getWriter() throws IOException {
        return new FileWriter(outputFileName);
    }
}

class ConsoleOutputStream extends OutputStream {
    @Override
    protected Writer getWriter() throws IOException {
        return new OutputStreamWriter(System.out);
    }
}

abstract class OutputStream {
    private PrintWriter out;

    public OutputStream open() throws IOException {
        out = new PrintWriter(getWriter());
        return this;
    }

    abstract protected Writer getWriter() throws IOException;

    public void print(Object... s) {
        for (Object token : s) {
            out.print(token);
        }
    }

    public void println(Object... s) {
        print(s);
        out.println();
    }

    public void println() {
        out.println();
    }

    public void flush() throws IOException {
        out.flush();
    }

    public void close() throws IOException {
        out.flush();
        out.close();
    }
}


class Pair<K, V> {
    private K key;
    private V value;

    Pair(K key, V value) {
        this.key = key;
        this.value = value;
    }

    K getKey() {
        return key;
    }

    V getValue() {
        return value;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Pair pair = (Pair) o;

        if (key != null ? !key.equals(pair.key) : pair.key != null) return false;
        if (value != null ? !value.equals(pair.value) : pair.value != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = key != null ? key.hashCode() : 0;
        result = 31 * result + (value != null ? value.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "Pair{" +
                "key=" + key +
                ", value=" + value +
                '}';
    }
}