import sys
begin=0
end=0x1000000
#partitions=10
partitions=int(sys.argv[1])
current=int(sys.argv[2])
inc=int(end/partitions)
#print(f"current: {current}")
#print(f"end: {end}")
#print(f"inc: {inc}")
start_object=begin + int(current)*int(inc)
end_object=start_object + int(inc)
#print(start_object)
if current > 0:
start_object += 1
if start_object >= end:
sys.exit(0)
#print(start_object)
start_object_str = hex(start_object).replace('0x', '')
end_object_str = hex(end_object).replace('0x', '')
if end_object < end -1:
print(f"swh storage backfill extid --start-object {start_object_str} --end-object {end_object_str}")
else:
print(f"swh storage backfill extid --start-object {start_object_str}")