First submission

(Terminated due to timeout on #3)