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, 0, 0, 0, 0, 0, 9, 1, -17, 14, -13, 14, -11, -13, -5, 23, 1, 8, -16, 5), (0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 7, 1, -14, 11, -10, 12, -9, -10, -4, 19, 0, 6, -13, 4), (0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 1, -13, 11, -10, 11, -9, -10, -4, 18, 0, 7, -13, 4), (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 10, 1, -19, 15, -14, 17, -11, -16, -7, 28, 0, 8, -17, 6), (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 5, 1, -8, 7, -6, 7, -5, -7, -3, 12, 0, 4, -8, 2), (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 9, 1, -13, 11, -9, 10, -8, -12, -6, 20, 1, 5, -12, 3), (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 1, -5, 4, -4, 5, -1, -6, -3, 11, -1, 1, -4, 1), (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, -3, 2, -2, 2, -2, -2, -1, 4, 0, 2, -3, 1), (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, -1, -1, 1, 0, 0, 0, -1), (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 1, -19, 16, -14, 16, -13, -15, -6, 26, 1, 9, -18, 6), (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, -1, 1, 1, -1, 0, 2, -1, 0, -1, -1) ]