TeamGHC's entry.  Written in Haskell, would you believe.

This is our non-lightning (3-day) submission.
