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.awt.*;
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.StringTokenizer;

import static java.lang.Math.max;
import static java.lang.System.exit;

public class Main implements Runnable {
    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    final Scanner in;
    Writer out;
    long timeBegin, timeEnd;

    public Main() throws FileNotFoundException {
        Locale.setDefault(Locale.US);
        if (ONLINE_JUDGE) {
            in = new Scanner(new InputStreamReader(System.in));
            out = new Writer(System.out);
        } else {
            in = new Scanner(new FileReader("input.txt"));
            //out = new Writer("output.txt");
            out = new Writer(System.out);
        }
    }

    public static void main(String[] args) throws FileNotFoundException {
        new Thread(null, new Main(), "", 128 * (1L << 20)).start();
    }

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time: " + (timeEnd - timeBegin) + "ms");
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            solve();
            out.close();
            time();
        } catch (Exception e) {
            e.printStackTrace(System.err);
            exit(-1);
        }
    }

    void solve() throws IOException {
        int n = in.nextInt();
        int[] a = in.nextIntArray(n);
        for (int i = 0; i < n - 1; i++) {
            for (int j = 0; j < a[i]; j++) {
                out.print("PRL");
            }
            out.print('R');
        }
        for (int j = 0; j < a[n - 1]; j++) {
            out.print("PLR");
        }
    }
}

class Scanner {
    BufferedReader in;
    StringTokenizer stringTokenizer;

    public Scanner(InputStreamReader inputStreamReader) throws FileNotFoundException {
        in = new BufferedReader(inputStreamReader);
    }

    String next() {
        while (stringTokenizer == null || !stringTokenizer.hasMoreElements()) {
            try {
                stringTokenizer = new StringTokenizer(in.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return stringTokenizer.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    int[] nextIntArray(int size) throws IOException {
        int[] array = new int[size];
        for (int index = 0; index < size; ++index) {
            array[index] = nextInt();
        }
        return array;
    }

    ArrayList<Integer> nextIntArrayList(int size) {
        ArrayList<Integer> result = new ArrayList<>();
        for (int i = 0; i < size; i++) {
            result.add(nextInt());
        }
        return result;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    long[] readLongArray(int size) throws IOException {
        long[] array = new long[size];
        for (int index = 0; index < size; ++index) {
            array[index] = nextLong();
        }
        return array;
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    double[] readDoubleArray(int size) throws IOException {
        double[] array = new double[size];

        for (int index = 0; index < size; ++index) {
            array[index] = nextDouble();
        }

        return array;
    }

    char nextChar() throws IOException {
        int intValue = in.read();
        while (intValue == 10 || intValue == 13) {
            intValue = in.read();
        }
        if (intValue == -1) {
            return '\0';
        }
        return (char) intValue;
    }

    char[] readCharArray() throws IOException {
        return nextLine().toCharArray();
    }

    BigInteger readBigInteger() throws IOException {
        return new BigInteger(next());
    }

    BigDecimal readBigDecimal() throws IOException {
        return new BigDecimal(next());
    }

    Point nextPoint() throws IOException {
        int x = nextInt(), y = nextInt();
        return new Point(x, y);
    }

    Point[] nextPointArray(int size) throws IOException {
        Point[] array = new Point[size];

        for (int index = 0; index < size; ++index) {
            array[index] = nextPoint();
        }

        return array;
    }

    List<Integer>[] readGraph(int vertexNumber, int edgeNumber) throws IOException {
        @SuppressWarnings("unchecked")
        List<Integer>[] graph = new List[vertexNumber];

        for (int index = 0; index < vertexNumber; ++index) {
            graph[index] = new ArrayList<>();
        }

        while (edgeNumber-- > 0) {
            int from = nextInt() - 1;
            int to = nextInt() - 1;

            graph[from].add(to);
            graph[to].add(from);
        }

        return graph;
    }


    String nextLine() {
        String str = "";
        try {
            str = in.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return str;
    }
}

class Writer extends PrintWriter {
    final int DEFAULT_PRECISION = 12;

    int precision;
    String format, formatWithSpace;

    {
        precision = DEFAULT_PRECISION;

        format = createFormat(precision);
        formatWithSpace = format + " ";
    }

    public Writer(OutputStream out) {
        super(out);
    }

    public Writer(String fileName) throws FileNotFoundException {
        super(fileName);
    }

    public int getPrecision() {
        return precision;
    }

    public void setPrecision(int precision) {
        precision = max(0, precision);
        this.precision = precision;

        format = createFormat(precision);
        formatWithSpace = format + " ";
    }

    public <T> void printMany(List<T> list) {
        for (T element : list) {
            print(element);
            print(" ");
        }
    }

    public void printMany(int[] a) {
        for (int element : a) {
            print(element);
            print(" ");
        }
    }

    private String createFormat(int precision) {
        return "%." + precision + "f";
    }

    @Override
    public void print(double d) {
        printf(format, d);
    }

    public void printWithSpace(double d) {
        printf(formatWithSpace, d);
    }

    public void printAll(double... d) {
        for (int i = 0; i < d.length - 1; ++i) {
            printWithSpace(d[i]);
        }

        print(d[d.length - 1]);
    }

    @Override
    public void println(double d) {
        printlnAll(d);
    }

    public void printlnAll(double... d) {
        printAll(d);
        println();
    }
}