import random
random.seed (1234)
n = 200000
p = [-1] * n
cur = n - 1
def chain (k):
global cur
for i in range (k - 2):
p[cur] = cur - 1
cur -= 1
cur -= 1
return cur + 1
def unite (s):
global cur
for c in s:
p[c] = cur
cur -= 1
return cur + 1
v1 = unite ([chain (2), chain (2), chain (2), chain (2),
chain (5), chain (11), chain (13), chain (13)])
v2 = unite ([chain (2), chain (41), chain (41), v1])
v3 = unite ([chain (2), v2])
v1x = unite ([chain (2), chain (2), chain (2), chain (2),
chain (5), chain (11), chain (13), chain (13)])
v2x = unite ([chain (2), chain (41), chain (41), v1x])
v3x = unite ([chain (2), v2x])
va = unite ([v3, v3x])
v1 = unite ([chain (2), chain (2), chain (2), chain (2),
chain (5), chain (11), chain (13), chain (13)])
v2 = unite ([chain (2), chain (41), chain (41), v1])
v3 = unite ([chain (2), v2])
v1x = unite ([chain (2), chain (2), chain (2), chain (2),
chain (5), chain (11), chain (13), chain (13)])
v2x = unite ([chain (2), chain (41), chain (42), v1x])
v3x = unite ([chain (2), v2x])
vb = unite ([v3, v3x])
vc = unite ([va, vb])
cur += 1
print n - cur
print ' '.join (map (lambda x: str (x - cur + 1), p[cur + 1:]))
aW1wb3J0IHJhbmRvbQpyYW5kb20uc2VlZCAoMTIzNCkKbiA9IDIwMDAwMApwID0gWy0xXSAqIG4KCmN1ciA9IG4gLSAxCgpkZWYgY2hhaW4gKGspOgoJZ2xvYmFsIGN1cgoJZm9yIGkgaW4gcmFuZ2UgKGsgLSAyKToKCQlwW2N1cl0gPSBjdXIgLSAxCgkJY3VyIC09IDEKCWN1ciAtPSAxCglyZXR1cm4gY3VyICsgMQoKZGVmIHVuaXRlIChzKToKCWdsb2JhbCBjdXIKCWZvciBjIGluIHM6CgkJcFtjXSA9IGN1cgoJY3VyIC09IDEKCXJldHVybiBjdXIgKyAxCgp2MSA9IHVuaXRlIChbY2hhaW4gKDIpLCBjaGFpbiAoMiksIGNoYWluICgyKSwgY2hhaW4gKDIpLAogICAgY2hhaW4gKDUpL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