Codeforces Beta Round #26 Problem CD