from random import *

N = 20
K = 50

n = randrange(1,N+1)
k = randrange(1,K+1)

print n, k

for i in xrange(n):
	print randrange(1,N+1),
print

from random import *

N = 20
K = 50

n = randrange(1,N+1)
k = randrange(1,K+1)

print n, k

for i in xrange(n):
	print randrange(1,N+1),
print
