# POTD 8 skel
# Author:  <anonymized>
# Date: 4/29/25
# Description: A program that takes days of the month and the start date to make a calender 


import sys

days = int(sys.argv[1])
weekend = int(sys.argv[2])




if days < 28 or days > 32:
    print("Number of days must be between 28 and 32")
elif weekend < 0 or weekend > 6:
    print("Start day must be between Sunday and Saturday")
else:
    print("su mo tu we th fr sa")
    print("   " * weekend, end='') 


for day in range(1, days + 1):
    print(f"{day:2} ", end='')
    if (weekend + day) % 7 == 0:
        print()

