import calendar
print 'Print a calendar for any month!'
month = int(raw_input('Month (mm)? '))
year = int(raw_input('Year (yyyy)? '))
print '\n'
calendar.setfirstweekday(calendar.SUNDAY)
cal = calendar.monthcalendar(year, month)
if len(str(month)) == 1:
month = '0%s' % month
# print header
print '|++++++ %s-%s +++++|' % (month, year)
print '|Su Mo Tu We Th Fr Sa|'
print '|--------------------|'
# draw calendar views
border = '|'
for week in cal:
line = border
for day in week:
if day == 0:
line += ' ' # 3 spaces for blank days
elif len(str(day)) == 1:
line += ' %d ' % day
else:
line += '%d ' % day
line = line[0:len(line) - 1] # remove space in last column
line += border
print line
print '|--------------------|\n'