Codeforces Round #167 Problem BCD