Generating Brainf*** NOPs Sometimes when writing brainfuck code, you feel the need to make it longer than needed to encourage debugging. You could do it by just plopping a &gt;&lt; in there, but what fun is that? You'll need something longer and less NOPey to confuse anybody reading your code.

Quick introduction to Brainfuck


  Brainfuck is an esoteric programming language created in 1993 by Urban Müller, and notable for its extreme minimalism. (Wikipedia)


Brainfuck is a language based on eight commands: +-&gt;&lt;,.[]. The code is run on something like a Turing machine: an infinite tape on which values can be changed. In this challenge, we'll focus on the first four:

+    increment the value at the pointer
-    decrement the value at the pointer
&gt;    move the pointer right
&lt;    move the pointer left


Brainfuck NOPs

A brainfuck NOP is a sequence of brainfuck characters that, when executed from any state, leads to no change in the state. They consist of the four characters mentioned above.

The Challenge

The challenge is to write a program or function that, when executed, generates a random brainfuck NOP of the given length.

Input

You will receive as input a nonnegative even integer n. (NOPs are impossible for odd n.)

Output

You will output a random brainfuck NOP of the length n.

Rules


The definition of NOP: when the output of the program is inserted at any point in a brainfuck program, the behavior of said program must not change in any way. In other words, it must not change the state of the interpreter.


Note that for example +&gt;-&lt; is incorrect, since it changes the values of the two cells without changing them back. Please test your solution for these before posting.
Also note that +&gt;-&lt;-&gt;+&lt; is a NOP that can't be reduced to nothing just by removing &gt;&lt; &lt;&gt; +- -+. Thus, you can't use an algorithm that just inserts these inside each other.

Every valid NOP of the length n must have a nonzero chance of appearing in the output. The distribution does not have to be uniform, though.
The brainfuck interpreter in question has a doubly infinite tape of arbitrary precision cells. That is, you can go infinitely to the both directions, and increment/decrement each cell indefinitely.
The program must finish within 1 minute for n = 100 on my machine, so no generating all possible NOPs and picking one.
If given invalid input (non-integer, negative, odd, etc.) you may do anything you'd like, including crash.


Scoring

This is code-golf, so the shortest answer in bytes wins.

Examples

Here are all valid outputs for n = 4:

++--    +-+-    +--+    --++    -+-+    -++-
&gt;&gt;&lt;&lt;    &gt;&lt;&gt;&lt;    &gt;&lt;&lt;&gt;    &lt;&lt;&gt;&gt;    &lt;&gt;&lt;&gt;    &lt;&gt;&gt;&lt;
&gt;&lt;+-    &gt;&lt;-+    &lt;&gt;+-    &lt;&gt;-+
&gt;+-&lt;    &gt;-+&lt;    &lt;+-&gt;    &lt;-+&gt;
+&gt;&lt;-    -&gt;&lt;+    +&lt;&gt;-    -&lt;&gt;+
+-&gt;&lt;    -+&gt;&lt;    +-&lt;&gt;    -+&lt;&gt;


Here are a few possible outputs for n = 20:

+&gt;&gt;-&gt;+&lt;-&gt;-&lt;&lt;&lt;-&gt;&gt;++&lt;&lt;
&gt;+&gt;-&lt;+&lt;-&gt;+-&lt;&gt;-&gt;+&lt;-&lt;+
+--+-++--++-+--+-++-
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;+-&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;
CJam, 118 116 bytes

This got slightly out of hand... especially the second half seems like it should be very golfable.

ri2/_)mr:R-"&lt;&gt;"R*mr_'=fm0\{1$+}%+__&amp;e`]:\{mr1aa..+}*\@](\z:~\{~\("+-"*mr1$3$e=[{_,)mr_2$&lt;@@&gt;}*+]@@f{`1$`={(}@?\}W&lt;}/


Test it here.

This handles N = 100 pretty much instantly. I don't have time to write the full breakdown of the code now, so here is the algorithm:


Generate a random balanced string of &lt; and &gt; with random (even) length between 0 and N inclusive.
Riffle the tape head positions into this array. E.g. "&lt;&gt;&gt;&lt;" becomes [0 '&lt; -1 '&gt; 0 '&gt; 1 '&lt; 0].
Get a list of all positions reached in the process.
For each such position initialise an empty string. Also determine how many pairs of characters are left to reach a string of length N.
For each remaining pair append +- to the string of a random position.
Shuffle all of those strings.
For each position determine how often that position occurs in the riffled array, and split the corresponding string into that many (random-length) chunks.
In the riffled array, replace the occurrences of the position with its random chunks.


Done. This is based on the observation that:


Any NOP must have an equal amount of &lt; and &gt; to return the tape head to the original position.
The code will be a NOP as long as each tape cell is incremented as often as decremented.


By distributing random but balanced amounts of +s and -s between all the places where the tape head is on a given cell, we ensure that we find every possible NOP.