SCU 2008 warmup contest 3

F: Deduction