Constructing an unrestricted grammar for a^n b^m c^n d^m I've been trying to construct an unrestricted grammar which has the language:

L = {a^n b^m c^n d^m | n&gt;0, m&gt;0}

But I can't seem to figure it out without making the derivations run an unreasonably long amount of time.  Can anyone help me devise an elegant way to create this grammar?

Edit: In order to clarify, I was trying to find an Unrestricted Grammar that would run in O(n^2) time or better.  As it stood, all of my solutions were exponential, which made parsing very long strings prohibitively costly.
How about the following:
$$
\begin{align*}
&amp;S \to XY \\
&amp;X \to aXC | aC \\
&amp;Y \to BYd | Bd \\
&amp;CB \to BC \\
&amp;aB \to ab \\
&amp;bB \to bb \\
&amp;Cd \to cd \\
&amp;Cc \to cc \\
\end{align*}
$$
In this grammar you need to apply $O(nm)$ rules to get $a^nb^mc^nd^m$.