Added final working code.

Time:0.0
Memory:1.6M