Download
An Ordering of Integers.

Montague, A stack to hold the array.
The Ghost, a temporary stack.
Lennox, size of the full dataset.
Romeo, size of Montague.
Hamlet, gap size.
Ulysses, swapped.
Duncan, for i < Duncan.
Dorcas, i.
Juliet, Return value/Argument.
Cassius, an index argument.
Antonio, a.
Arthur, b.
Angelo, a call stack.
Titus, a temporary.

              Act I: The final insult.

              Scene I: A strange conversation to setup the plot.

[Enter Montague and Titus]

Montague:
 Thou art nothing!

Titus:
 Remember me.  Thou art a large purple flower.  Remember thyself.

Montague:
 Thou art a cute chihuahua.

Titus:
 Remember me.  Thou art the difference between an old small rural town and a cow!  Remember thyself!

Montague:
 Thou art the SUM of an old small rural town and a cow!

Titus:
 Remember me.  Thou art the difference between me and the difference between the square of a red rose and a lantern!  Remember thyself.

Montague:
 You hairy disgusting smelly toad! Thou art the
 difference between nothing and thyself!

Titus:
 Remember me.  Thou art the difference between the square of a beautiful summer's day and an angel.  Remember thyself.  Thou art the sum of a charming king and thyself.  Remember thyself.  Thou art the sum of thyself and a hair.  Remember thyself.  Thou art a joy!  Remember thyself.

[Exeunt]
[Enter Lennox and Romeo]

Lennox:
 You are the difference between nothing and a large disgusting
 horrid goat.  You are the sum of an old red rose and thyself.
 You are the difference between thyself and a nose.

Romeo:
 You are like me.

[Exeunt]
[Enter Angelo and Titus]

Titus:
 You are a red pony.  Remember yourself. Let us proceed to scene IV.

              Scene II: we're ready to sort.

[Exeunt]
[Enter Titus and Angelo]

Angelo:
 You are the sum of a red pony and a door.

Titus:
 Remember me.  Let us proceed to scene VII.

              Scene III: all done.

[Exeunt]
[Enter Titus]

Titus:
 We must proceed to scene XX.

              Scene IV: Montague bares all.

[Exeunt]
[Enter The Ghost and Montague]

The Ghost:
 Recall the joys of youth.  Open your heart.

Montague:
 Remember me.

The Ghost:
 You are a bold brave happy fine noble hero.  Speak your mind.

[Exit Montague]
[Enter Romeo]

The Ghost:
 You are the difference between thyself and a brother. Are you
 as good as nothing?

Romeo:
 If not, we must return to scene IV.
 You are the sum of a large red fellow and a big normal furry
 roman. Speak your mind! You are the sum of thyself and a
 door.  Speak your mind!


              Scene V: The restoration of Montague's station.

[Exeunt]
[Enter Romeo and Lennox]

Romeo:
 Am I as good as you?

Lennox:
 If so, we must proceed to scene VI.

[Exeunt]
[Enter The Ghost and Montague]

Montague:
 Recall the blue skies of Jamaca.

The Ghost:
 Remember me.

[Exit The Ghost]
[Enter Romeo]

Montague:
 You are the sum of thyself and a brother.

[Exit Montague]
[Enter Lennox]

Romeo:
 Am I as good as you?

Lennox:
 If not, we must return to scene V.  If so, we must proceed to
 scene VI.

              Scene VI: Return up the call stack.

[Exeunt]
[Enter Angelo and Titus]

Titus:
 Recall your origins.

Angelo:
 Am I as good as a pony?

Titus:
 If so, we must return to scene XXI.

Angelo:
 Am I as good as a red pony?

Titus:
 If so, we must return to scene II.

Angelo:
 Am I as good as the sum of a red pony and a door?

Titus:
 If so, we must return to scene III.

Angelo:
 Am I as good as a big red pony?

Titus:
 If so, we must return to scene X.

Angelo:
 Am I as good as the sum of a big red pony and a chihuahua?

Titus:
 If so, we must return to scene XI.

Angelo:
 Am I as good as the sum of a big red pony and a furry
 chihuahua?

Titus:
 If so, we must return to scene XII.

Angelo:
 Am I as good as the difference between a big cute red pony and a chihuahua?

Titus:
 If so, we must return to scene XIII.

              Scene VII: The real fun begins.

[Exeunt]
[Enter Hamlet and Lennox]

Lennox:
 You are like me.

              Scene VIII: The big loop.

[Exeunt]
[Enter Hamlet and Titus]

Hamlet:
 You are the square of a furry happy chihuahua.  You are the
 difference between thyself and a red rose.  You are the
 sum of thyself and a hound.

Titus:
 You are the product of thyself and the sum of a large furry
 cute roman and a normal morning.  You are the quotient between
 thyself and me.

Hamlet:
 Am I worse than a door?

Titus:
 If so, you are a door.

[Exit Hamlet]
[Enter Ulysses]

Titus:
 You are nothing.

[Exit Ulysses]
[Enter Duncan]

Titus:
 You are the difference between Lennox and Hamlet.

[Exit Duncan]
[Enter Dorcas]

Titus:
 You are nothing.

              Scene IX: The inner loop.

[Exeunt]
[Enter Cassius and Angelo]

Angelo:
 You are like Dorcas.

Cassius:
 You are a big red pony.  Remember yourself.  We must proceed
 to scene XVI.

              Scene X: Return with the first item.

[Exeunt]
[Enter Cassius and Antonio]

Cassius:
 You are like Juliet.

[Exit Antonio]
[Enter Dorcas]

Dorcas:
 You are like me.  You are the sum of yourself and Hamlet.

[Exit Dorcas]
[Enter Angelo]

Cassius:
 You are the sum of a big red pony and a chihuahua.  Remember
 yourself.  We must proceed to scene XVI.

              Scene XI: Return with the second item.

[Exeunt]
[Enter Arthur and Juliet]

Juliet:
 You are like me.

[Exit Juliet]
[Enter Antonio]

Antonio:
 Am I better than you?

Arthur:
 If not, we must proceed to scene XIV.

[Exit Antonio]
[Enter Ulysses]

Arthur:
 You are a pony.

[Exit Ulysses]
[Enter Juliet]

Arthur:
 You are like me.

[Exeunt]
[Enter Cassius and Dorcas]

Dorcas:
 You are like me.

[Exit Dorcas]
[Enter Angelo]

Cassius:
 You are the sum of a big red pony and a furry chihuahua. 
 Remember yourself.  We must proceed to scene XVIII.

              Scene XII: return from the first replacement.

[Exeunt]
[Enter Cassius and Dorcas]

Dorcas:
 You are like me.  You are the sum of thyself and Hamlet.

[Exeunt]
[Enter Juliet and Antonio]

Antonio:
 You are like me.

[Exit Juliet]
[Enter Angelo]

Antonio:
 You are the difference between a cute big red pony and a
 chihuahua.  Remember yourself.  We must proceed to scene XVIII.

              Scene XIII: return from the second replacement.

[Exeunt]

              Scene XIV: bottom of the inner loop.

[Exeunt]
[Enter Dorcas and Duncan]

Duncan:
 You are the sum of yourself and a rose.

Dorcas:
 Am I worse than you?

Duncan:
 If so, we must return to scene IX.

Dorcas:
 Is Ulysses as good as nothing?

Duncan:
 If so, let us proceed to scene XV.  If not, we must return to scene
 VIII.

              Scene XV: We didn't swap.

Dorcas:
 Is Hamlet as good as a pony?

Duncan:
 If so, let us proceed to scene XX.

Dorcas:
 We must return to scene VIII.

              Scene XVI: Retrieve an item.

[Exeunt]
[Enter Romeo and Cassius]

Cassius:
 Am I as good as the difference between Lennox and you?

Romeo:
 If so, we must proceed to scene XVII.

[Exeunt]
[Enter Montague and The Ghost]

The Ghost:
 Recall the glories of old.

Montague:
 Remember me.

[Exit Montague]
[Enter Romeo]

The Ghost:
 You are the difference between yourself and a father.  We must
 return to scene XVI.

              Scene XVII: we found it.

[Exeunt]
[Enter Montague and Juliet]

Juliet:
 Recall that one time in band camp.

Montague:
 You are like me.

Juliet:
  Remember me.  We must proceed to scene V.

              Scene XVIII: In Montague, replace Bianca with Juliet.

[Exeunt]
[Enter Romeo and Cassius]

Cassius:
 Am I as good as the difference between Lennox and you?

Romeo:
 If so, we shall proceed to Scene XIX.

[Exeunt]
[Enter Montague and The Ghost]

The Ghost:
 Recall the drama of Jiva.

Montague:
 Remember me.

[Exit Montague]
[Enter Romeo]

The Ghost:
 You are the difference between yourself and a niece.  We must
 return to scene XVIII.

              Scene XIX: we found it.

[Exeunt]
[Enter Montague and Juliet]

Juliet:
 Recall that special shade of red.  Remember me.  We must
 proceed to scene V.

              Scene XX: print and exit.

[Exeunt]
[Enter Angelo and Titus]

Titus:
 Thou art a pony.  Remember thyself.  Let us proceed to scene IV.

              Scene XXI: Fin.

[Exeunt]