fixed codeforces round 222 problem C