SCU 2007 warmup contest 5

D: Outernet