#include <iostream>
using namespace std;
int getMonth(int m, int y) {
return 31-(102/m&1)-((4/m&2)>>((!y%4)-(!y%100)+(!y%400)));
}
int main() {
// your code goes here
for (int i = 1; i <= 12; i++) {
cout << getMonth(i, 1996) << " ";
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IGdldE1vbnRoKGludCBtLCBpbnQgeSkgewoJcmV0dXJuIDMxLSgxMDIvbSYxKS0oKDQvbSYyKT4+KCgheSU0KS0oIXklMTAwKSsoIXklNDAwKSkpOwkKfQoKaW50IG1haW4oKSB7CgkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCglmb3IgKGludCBpID0gMTsgaSA8PSAxMjsgaSsrKSB7CgkJY291dCA8PCBnZXRNb250aChpLCAxOTk2KSA8PCAiICI7Cgl9CgoJcmV0dXJuIDA7Cn0=