odeforces Round #169 Problem ABCD