#!/usr/bin/env python3
from random import randint
import sys
import random

# Argument handling consistent with gen.toml testcases
if len(sys.argv) < 3:
    print("Usage: gen_q_equal_1_ll.py <n> <maxa> <seed>")
    sys.exit(1)

n = int(sys.argv[1])
maxa = int(sys.argv[2])
seed = int(sys.argv[3])

random.seed(seed)

print(n, 1)

tot = 0
a = []
while tot <= 2147483647:
    val = random.randint(maxa - 10, maxa)
    tot += val
    a.append(val)
    n -= 1


for _ in range(n):
    a.append(1)

print(*a)
print(maxa)


