#module
#deffunc swap var a, var b, local t
t=a
a=b
b=t
return
#defcfunc cmp str a_, str b_, local a, local b, local a_len, local b_len, local ret
a=a_
b=b_
a_len=strlen(a)
b_len=strlen(b)
if a_len!b_len : return a_len-b_len
repeat a_len
if peek(a, cnt)!peek(b, cnt) {
ret=peek(a, cnt)-peek(b, cnt)
break
}
loop
return ret
#deffunc result_add array result, str add_member, local i
result.length(result)=add_member
for i, length(result)-1, 0, -1
if cmp(result(i), result(i-1))>=0 : _break
swap result(i), result(i-1)
next
return
#deffunc solve array result, local index
sdim result
result.0="1"
repeat
if length(result)>=1001 : break
result_add result, result.index+"0"
result_add result, result.index+"01"
index++
loop
return
#global
solve result
buf=""
repeat 1000
buf+=result.cnt+"\n"
loop
mesbox buf, ginfo_sx, ginfo_sy
I21vZHVsZQojZGVmZnVuYyBzd2FwIHZhciBhLCB2YXIgYiwgbG9jYWwgdAoJdD1hCglhPWIKCWI9dAoJcmV0dXJuCgojZGVmY2Z1bmMgY21wIHN0ciBhXywgc3RyIGJfLCBsb2NhbCBhLCBsb2NhbCBiLCBsb2NhbCBhX2xlbiwgbG9jYWwgYl9sZW4sIGxvY2FsIHJldAoJYT1hXwoJYj1iXwoJYV9sZW49c3RybGVuKGEpCgliX2xlbj1zdHJsZW4oYikKCWlmIGFfbGVuIWJfbGVuIDogcmV0dXJuIGFfbGVuLWJfbGVuCglyZXBlYXQgYV9sZW4KCQlpZiBwZWVrKGEsIGNudCkhcGVlayhiLCBjbnQpIHsKCQkJcmV0PXBlZWsoYSwgY250KS1wZWVrKGIsIGNudCkKCQkJYnJlYWsKCQl9Cglsb29wCglyZXR1cm4gcmV0CgojZGVmZnVuYyByZXN1bHRfYWRkIGFycmF5IHJlc3VsdCwgc3RyIGFkZF9tZW1iZXIsIGxvY2FsIGkKCXJlc3VsdC5sZW5ndGgocmVzdWx0KT1hZGRfbWVtYmVyCglmb3IgaSwgbGVuZ3RoKHJlc3VsdCktMSwgMCwgLTEKCQlpZiBjbXAocmVzd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