f300 = [0,1] ++ f 1
where
f n = replicate (f300 !! n) n ++ f (n+1)
main
= print $ map (f300
!!) [10,100,1000,12345678]
ZjMwMCA6OiBbSW50XQpmMzAwID0gWzAsMV0gKysgZiAxCiAgd2hlcmUKICAgIGYgbiA9IHJlcGxpY2F0ZSAoZjMwMCAhISBuKSBuICsrIGYgKG4rMSkKCm1haW4gOjogSU8gKCkKbWFpbiA9IHByaW50ICQgbWFwIChmMzAwICEhKSBbMTAsMTAwLDEwMDAsMTIzNDU2NzhdCg==