結果 : beautiful matrix codeforces solution in python