Grammar generating specific language Construct a context-sensitive grammar that generates L:

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


I believe my productions should go along this lines:

S-&gt; ABCC
A-&gt; a|aBC|BC
B-&gt; b|bBC
C-&gt; c|Cc
CB-&gt;BC


The idea is to start with 2 c and keep always one more c, and then with C->c|Cc ad as much c as i want. 
How can my production for C remember the numbers of m and n.
Hint. Can you figure out a regular grammar such that for any $k, m, n$ with $k &gt; n$ and $k &gt; m$, there is a word in its language with that number of a, b and c (in any order)?

Hint. Did you know that you can sort with a context sensitive grammar? See an example for inspiration.