#include <stdio.h> void printPalindroms(char* buffer, int length, int amount, int* alreadyPrinted); int main(void) { int n; char buffer[32] = {0}; int currentPalindromLength = 0; int palindromsWithCurrentLength = 1; int printIndex = 1; while (n > 0) { int amount = n < palindromsWithCurrentLength ? n : palindromsWithCurrentLength; printPalindroms(buffer, currentPalindromLength, amount, &printIndex); n -= amount; ++currentPalindromLength; if (currentPalindromLength % 2) { palindromsWithCurrentLength <<= 1; } } return 0; } void printPalindroms(char* buffer, int length, int amount, int* printIndex) { int k = (length + 1) / 2; for (int i = 0; i < amount; ++i) { for (int j = 0, mask = 1 << (k - 1); mask > 0; ++j, mask >>= 1) { buffer[j] = (i & mask) ? 'b' : 'a'; } ++*printIndex; for (char* p = &buffer[k - 1 - (length % 2)]; p >= buffer; --p) { } } }
1000
1. 2. a 3. b 4. aa 5. bb 6. aaa 7. aba 8. bab 9. bbb 10. aaaa 11. abba 12. baab 13. bbbb 14. aaaaa 15. aabaa 16. ababa 17. abbba 18. baaab 19. babab 20. bbabb 21. bbbbb 22. aaaaaa 23. aabbaa 24. abaaba 25. abbbba 26. baaaab 27. babbab 28. bbaabb 29. bbbbbb 30. aaaaaaa 31. aaabaaa 32. aababaa 33. aabbbaa 34. abaaaba 35. abababa 36. abbabba 37. abbbbba 38. baaaaab 39. baabaab 40. bababab 41. babbbab 42. bbaaabb 43. bbababb 44. bbbabbb 45. bbbbbbb 46. aaaaaaaa 47. aaabbaaa 48. aabaabaa 49. aabbbbaa 50. abaaaaba 51. ababbaba 52. abbaabba 53. abbbbbba 54. baaaaaab 55. baabbaab 56. babaabab 57. babbbbab 58. bbaaaabb 59. bbabbabb 60. bbbaabbb 61. bbbbbbbb 62. aaaaaaaaa 63. aaaabaaaa 64. aaababaaa 65. aaabbbaaa 66. aabaaabaa 67. aabababaa 68. aabbabbaa 69. aabbbbbaa 70. abaaaaaba 71. abaabaaba 72. ababababa 73. ababbbaba 74. abbaaabba 75. abbababba 76. abbbabbba 77. abbbbbbba 78. baaaaaaab 79. baaabaaab 80. baababaab 81. baabbbaab 82. babaaabab 83. babababab 84. babbabbab 85. babbbbbab 86. bbaaaaabb 87. bbaabaabb 88. bbabababb 89. bbabbbabb 90. bbbaaabbb 91. bbbababbb 92. bbbbabbbb 93. bbbbbbbbb 94. aaaaaaaaaa 95. aaaabbaaaa 96. aaabaabaaa 97. aaabbbbaaa 98. aabaaaabaa 99. aababbabaa 100. aabbaabbaa 101. aabbbbbbaa 102. abaaaaaaba 103. abaabbaaba 104. ababaababa 105. ababbbbaba 106. abbaaaabba 107. abbabbabba 108. abbbaabbba 109. abbbbbbbba 110. baaaaaaaab 111. baaabbaaab 112. baabaabaab 113. baabbbbaab 114. babaaaabab 115. bababbabab 116. babbaabbab 117. babbbbbbab 118. bbaaaaaabb 119. bbaabbaabb 120. bbabaababb 121. bbabbbbabb 122. bbbaaaabbb 123. bbbabbabbb 124. bbbbaabbbb 125. bbbbbbbbbb 126. aaaaaaaaaaa 127. aaaaabaaaaa 128. aaaababaaaa 129. aaaabbbaaaa 130. aaabaaabaaa 131. aaabababaaa 132. aaabbabbaaa 133. aaabbbbbaaa 134. aabaaaaabaa 135. aabaabaabaa 136. aababababaa 137. aababbbabaa 138. aabbaaabbaa 139. aabbababbaa 140. aabbbabbbaa 141. aabbbbbbbaa 142. abaaaaaaaba 143. abaaabaaaba 144. abaababaaba 145. abaabbbaaba 146. ababaaababa 147. abababababa 148. ababbabbaba 149. ababbbbbaba 150. abbaaaaabba 151. abbaabaabba 152. abbabababba 153. abbabbbabba 154. abbbaaabbba 155. abbbababbba 156. abbbbabbbba 157. abbbbbbbbba 158. baaaaaaaaab 159. baaaabaaaab 160. baaababaaab 161. baaabbbaaab 162. baabaaabaab 163. baabababaab 164. baabbabbaab 165. baabbbbbaab 166. babaaaaabab 167. babaabaabab 168. bababababab 169. bababbbabab 170. babbaaabbab 171. babbababbab 172. babbbabbbab 173. babbbbbbbab 174. bbaaaaaaabb 175. bbaaabaaabb 176. bbaababaabb 177. bbaabbbaabb 178. bbabaaababb 179. bbababababb 180. bbabbabbabb 181. bbabbbbbabb 182. bbbaaaaabbb 183. bbbaabaabbb 184. bbbabababbb 185. bbbabbbabbb 186. bbbbaaabbbb 187. bbbbababbbb 188. bbbbbabbbbb 189. bbbbbbbbbbb 190. aaaaaaaaaaaa 191. aaaaabbaaaaa 192. aaaabaabaaaa 193. aaaabbbbaaaa 194. aaabaaaabaaa 195. aaababbabaaa 196. aaabbaabbaaa 197. aaabbbbbbaaa 198. aabaaaaaabaa 199. aabaabbaabaa 200. aababaababaa 201. aababbbbabaa 202. aabbaaaabbaa 203. aabbabbabbaa 204. aabbbaabbbaa 205. aabbbbbbbbaa 206. abaaaaaaaaba 207. abaaabbaaaba 208. abaabaabaaba 209. abaabbbbaaba 210. ababaaaababa 211. abababbababa 212. ababbaabbaba 213. ababbbbbbaba 214. abbaaaaaabba 215. abbaabbaabba 216. abbabaababba 217. abbabbbbabba 218. abbbaaaabbba 219. abbbabbabbba 220. abbbbaabbbba 221. abbbbbbbbbba 222. baaaaaaaaaab 223. baaaabbaaaab 224. baaabaabaaab 225. baaabbbbaaab 226. baabaaaabaab 227. baababbabaab 228. baabbaabbaab 229. baabbbbbbaab 230. babaaaaaabab 231. babaabbaabab 232. bababaababab 233. bababbbbabab 234. babbaaaabbab 235. babbabbabbab 236. babbbaabbbab 237. babbbbbbbbab 238. bbaaaaaaaabb 239. bbaaabbaaabb 240. bbaabaabaabb 241. bbaabbbbaabb 242. bbabaaaababb 243. bbababbababb 244. bbabbaabbabb 245. bbabbbbbbabb 246. bbbaaaaaabbb 247. bbbaabbaabbb 248. bbbabaababbb 249. bbbabbbbabbb 250. bbbbaaaabbbb 251. bbbbabbabbbb 252. bbbbbaabbbbb 253. bbbbbbbbbbbb 254. aaaaaaaaaaaaa 255. aaaaaabaaaaaa 256. aaaaababaaaaa 257. aaaaabbbaaaaa 258. aaaabaaabaaaa 259. aaaabababaaaa 260. aaaabbabbaaaa 261. aaaabbbbbaaaa 262. aaabaaaaabaaa 263. aaabaabaabaaa 264. aaababababaaa 265. aaababbbabaaa 266. aaabbaaabbaaa 267. aaabbababbaaa 268. aaabbbabbbaaa 269. aaabbbbbbbaaa 270. aabaaaaaaabaa 271. aabaaabaaabaa 272. aabaababaabaa 273. aabaabbbaabaa 274. aababaaababaa 275. aabababababaa 276. aababbabbabaa 277. aababbbbbabaa 278. aabbaaaaabbaa 279. aabbaabaabbaa 280. aabbabababbaa 281. aabbabbbabbaa 282. aabbbaaabbbaa 283. aabbbababbbaa 284. aabbbbabbbbaa 285. aabbbbbbbbbaa 286. abaaaaaaaaaba 287. abaaaabaaaaba 288. abaaababaaaba 289. abaaabbbaaaba 290. abaabaaabaaba 291. abaabababaaba 292. abaabbabbaaba 293. abaabbbbbaaba 294. ababaaaaababa 295. ababaabaababa 296. ababababababa 297. abababbbababa 298. ababbaaabbaba 299. ababbababbaba 300. ababbbabbbaba 301. ababbbbbbbaba 302. abbaaaaaaabba 303. abbaaabaaabba 304. abbaababaabba 305. abbaabbbaabba 306. abbabaaababba 307. abbababababba 308. abbabbabbabba 309. abbabbbbbabba 310. abbbaaaaabbba 311. abbbaabaabbba 312. abbbabababbba 313. abbbabbbabbba 314. abbbbaaabbbba 315. abbbbababbbba 316. abbbbbabbbbba 317. abbbbbbbbbbba 318. baaaaaaaaaaab 319. baaaaabaaaaab 320. baaaababaaaab 321. baaaabbbaaaab 322. baaabaaabaaab 323. baaabababaaab 324. baaabbabbaaab 325. baaabbbbbaaab 326. baabaaaaabaab 327. baabaabaabaab 328. baababababaab 329. baababbbabaab 330. baabbaaabbaab 331. baabbababbaab 332. baabbbabbbaab 333. baabbbbbbbaab 334. babaaaaaaabab 335. babaaabaaabab 336. babaababaabab 337. babaabbbaabab 338. bababaaababab 339. babababababab 340. bababbabbabab 341. bababbbbbabab 342. babbaaaaabbab 343. babbaabaabbab 344. babbabababbab 345. babbabbbabbab 346. babbbaaabbbab 347. babbbababbbab 348. babbbbabbbbab 349. babbbbbbbbbab 350. bbaaaaaaaaabb 351. bbaaaabaaaabb 352. bbaaababaaabb 353. bbaaabbbaaabb 354. bbaabaaabaabb 355. bbaabababaabb 356. bbaabbabbaabb 357. bbaabbbbbaabb 358. bbabaaaaababb 359. bbabaabaababb 360. bbabababababb 361. bbababbbababb 362. bbabbaaabbabb 363. bbabbababbabb 364. bbabbbabbbabb 365. bbabbbbbbbabb 366. bbbaaaaaaabbb 367. bbbaaabaaabbb 368. bbbaababaabbb 369. bbbaabbbaabbb 370. bbbabaaababbb 371. bbbababababbb 372. bbbabbabbabbb 373. bbbabbbbbabbb 374. bbbbaaaaabbbb 375. bbbbaabaabbbb 376. bbbbabababbbb 377. bbbbabbbabbbb 378. bbbbbaaabbbbb 379. bbbbbababbbbb 380. bbbbbbabbbbbb 381. bbbbbbbbbbbbb 382. aaaaaaaaaaaaaa 383. aaaaaabbaaaaaa 384. aaaaabaabaaaaa 385. aaaaabbbbaaaaa 386. aaaabaaaabaaaa 387. aaaababbabaaaa 388. aaaabbaabbaaaa 389. aaaabbbbbbaaaa 390. aaabaaaaaabaaa 391. aaabaabbaabaaa 392. aaababaababaaa 393. aaababbbbabaaa 394. aaabbaaaabbaaa 395. aaabbabbabbaaa 396. aaabbbaabbbaaa 397. aaabbbbbbbbaaa 398. aabaaaaaaaabaa 399. aabaaabbaaabaa 400. aabaabaabaabaa 401. aabaabbbbaabaa 402. aababaaaababaa 403. aabababbababaa 404. aababbaabbabaa 405. aababbbbbbabaa 406. aabbaaaaaabbaa 407. aabbaabbaabbaa 408. aabbabaababbaa 409. aabbabbbbabbaa 410. aabbbaaaabbbaa 411. aabbbabbabbbaa 412. aabbbbaabbbbaa 413. aabbbbbbbbbbaa 414. abaaaaaaaaaaba 415. abaaaabbaaaaba 416. abaaabaabaaaba 417. abaaabbbbaaaba 418. abaabaaaabaaba 419. abaababbabaaba 420. abaabbaabbaaba 421. abaabbbbbbaaba 422. ababaaaaaababa 423. ababaabbaababa 424. abababaabababa 425. abababbbbababa 426. ababbaaaabbaba 427. ababbabbabbaba 428. ababbbaabbbaba 429. ababbbbbbbbaba 430. abbaaaaaaaabba 431. abbaaabbaaabba 432. abbaabaabaabba 433. abbaabbbbaabba 434. abbabaaaababba 435. abbababbababba 436. abbabbaabbabba 437. abbabbbbbbabba 438. abbbaaaaaabbba 439. abbbaabbaabbba 440. abbbabaababbba 441. abbbabbbbabbba 442. abbbbaaaabbbba 443. abbbbabbabbbba 444. abbbbbaabbbbba 445. abbbbbbbbbbbba 446. baaaaaaaaaaaab 447. baaaaabbaaaaab 448. baaaabaabaaaab 449. baaaabbbbaaaab 450. baaabaaaabaaab 451. baaababbabaaab 452. baaabbaabbaaab 453. baaabbbbbbaaab 454. baabaaaaaabaab 455. baabaabbaabaab 456. baababaababaab 457. baababbbbabaab 458. baabbaaaabbaab 459. baabbabbabbaab 460. baabbbaabbbaab 461. baabbbbbbbbaab 462. babaaaaaaaabab 463. babaaabbaaabab 464. babaabaabaabab 465. babaabbbbaabab 466. bababaaaababab 467. babababbababab 468. bababbaabbabab 469. bababbbbbbabab 470. babbaaaaaabbab 471. babbaabbaabbab 472. babbabaababbab 473. babbabbbbabbab 474. babbbaaaabbbab 475. babbbabbabbbab 476. babbbbaabbbbab 477. babbbbbbbbbbab 478. bbaaaaaaaaaabb 479. bbaaaabbaaaabb 480. bbaaabaabaaabb 481. bbaaabbbbaaabb 482. bbaabaaaabaabb 483. bbaababbabaabb 484. bbaabbaabbaabb 485. bbaabbbbbbaabb 486. bbabaaaaaababb 487. bbabaabbaababb 488. bbababaabababb 489. bbababbbbababb 490. bbabbaaaabbabb 491. bbabbabbabbabb 492. bbabbbaabbbabb 493. bbabbbbbbbbabb 494. bbbaaaaaaaabbb 495. bbbaaabbaaabbb 496. bbbaabaabaabbb 497. bbbaabbbbaabbb 498. bbbabaaaababbb 499. bbbababbababbb 500. bbbabbaabbabbb 501. bbbabbbbbbabbb 502. bbbbaaaaaabbbb 503. bbbbaabbaabbbb 504. bbbbabaababbbb 505. bbbbabbbbabbbb 506. bbbbbaaaabbbbb 507. bbbbbabbabbbbb 508. bbbbbbaabbbbbb 509. bbbbbbbbbbbbbb 510. aaaaaaaaaaaaaaa 511. aaaaaaabaaaaaaa 512. aaaaaababaaaaaa 513. aaaaaabbbaaaaaa 514. aaaaabaaabaaaaa 515. aaaaabababaaaaa 516. aaaaabbabbaaaaa 517. aaaaabbbbbaaaaa 518. aaaabaaaaabaaaa 519. aaaabaabaabaaaa 520. aaaababababaaaa 521. aaaababbbabaaaa 522. aaaabbaaabbaaaa 523. aaaabbababbaaaa 524. aaaabbbabbbaaaa 525. aaaabbbbbbbaaaa 526. aaabaaaaaaabaaa 527. aaabaaabaaabaaa 528. aaabaababaabaaa 529. aaabaabbbaabaaa 530. aaababaaababaaa 531. aaabababababaaa 532. aaababbabbabaaa 533. aaababbbbbabaaa 534. aaabbaaaaabbaaa 535. aaabbaabaabbaaa 536. aaabbabababbaaa 537. aaabbabbbabbaaa 538. aaabbbaaabbbaaa 539. aaabbbababbbaaa 540. aaabbbbabbbbaaa 541. aaabbbbbbbbbaaa 542. aabaaaaaaaaabaa 543. aabaaaabaaaabaa 544. aabaaababaaabaa 545. aabaaabbbaaabaa 546. aabaabaaabaabaa 547. aabaabababaabaa 548. aabaabbabbaabaa 549. aabaabbbbbaabaa 550. aababaaaaababaa 551. aababaabaababaa 552. aababababababaa 553. aabababbbababaa 554. aababbaaabbabaa 555. aababbababbabaa 556. aababbbabbbabaa 557. aababbbbbbbabaa 558. aabbaaaaaaabbaa 559. aabbaaabaaabbaa 560. aabbaababaabbaa 561. aabbaabbbaabbaa 562. aabbabaaababbaa 563. aabbababababbaa 564. aabbabbabbabbaa 565. aabbabbbbbabbaa 566. aabbbaaaaabbbaa 567. aabbbaabaabbbaa 568. aabbbabababbbaa 569. aabbbabbbabbbaa 570. aabbbbaaabbbbaa 571. aabbbbababbbbaa 572. aabbbbbabbbbbaa 573. aabbbbbbbbbbbaa 574. abaaaaaaaaaaaba 575. abaaaaabaaaaaba 576. abaaaababaaaaba 577. abaaaabbbaaaaba 578. abaaabaaabaaaba 579. abaaabababaaaba 580. abaaabbabbaaaba 581. abaaabbbbbaaaba 582. abaabaaaaabaaba 583. abaabaabaabaaba 584. abaababababaaba 585. abaababbbabaaba 586. abaabbaaabbaaba 587. abaabbababbaaba 588. abaabbbabbbaaba 589. abaabbbbbbbaaba 590. ababaaaaaaababa 591. ababaaabaaababa 592. ababaababaababa 593. ababaabbbaababa 594. abababaaabababa 595. abababababababa 596. abababbabbababa 597. abababbbbbababa 598. ababbaaaaabbaba 599. ababbaabaabbaba 600. ababbabababbaba 601. ababbabbbabbaba 602. ababbbaaabbbaba 603. ababbbababbbaba 604. ababbbbabbbbaba 605. ababbbbbbbbbaba 606. abbaaaaaaaaabba 607. abbaaaabaaaabba 608. abbaaababaaabba 609. abbaaabbbaaabba 610. abbaabaaabaabba 611. abbaabababaabba 612. abbaabbabbaabba 613. abbaabbbbbaabba 614. abbabaaaaababba 615. abbabaabaababba 616. abbabababababba 617. abbababbbababba 618. abbabbaaabbabba 619. abbabbababbabba 620. abbabbbabbbabba 621. abbabbbbbbbabba 622. abbbaaaaaaabbba 623. abbbaaabaaabbba 624. abbbaababaabbba 625. abbbaabbbaabbba 626. abbbabaaababbba 627. abbbababababbba 628. abbbabbabbabbba 629. abbbabbbbbabbba 630. abbbbaaaaabbbba 631. abbbbaabaabbbba 632. abbbbabababbbba 633. abbbbabbbabbbba 634. abbbbbaaabbbbba 635. abbbbbababbbbba 636. abbbbbbabbbbbba 637. abbbbbbbbbbbbba 638. baaaaaaaaaaaaab 639. baaaaaabaaaaaab 640. baaaaababaaaaab 641. baaaaabbbaaaaab 642. baaaabaaabaaaab 643. baaaabababaaaab 644. baaaabbabbaaaab 645. baaaabbbbbaaaab 646. baaabaaaaabaaab 647. baaabaabaabaaab 648. baaababababaaab 649. baaababbbabaaab 650. baaabbaaabbaaab 651. baaabbababbaaab 652. baaabbbabbbaaab 653. baaabbbbbbbaaab 654. baabaaaaaaabaab 655. baabaaabaaabaab 656. baabaababaabaab 657. baabaabbbaabaab 658. baababaaababaab 659. baabababababaab 660. baababbabbabaab 661. baababbbbbabaab 662. baabbaaaaabbaab 663. baabbaabaabbaab 664. baabbabababbaab 665. baabbabbbabbaab 666. baabbbaaabbbaab 667. baabbbababbbaab 668. baabbbbabbbbaab 669. baabbbbbbbbbaab 670. babaaaaaaaaabab 671. babaaaabaaaabab 672. babaaababaaabab 673. babaaabbbaaabab 674. babaabaaabaabab 675. babaabababaabab 676. babaabbabbaabab 677. babaabbbbbaabab 678. bababaaaaababab 679. bababaabaababab 680. bababababababab 681. babababbbababab 682. bababbaaabbabab 683. bababbababbabab 684. bababbbabbbabab 685. bababbbbbbbabab 686. babbaaaaaaabbab 687. babbaaabaaabbab 688. babbaababaabbab 689. babbaabbbaabbab 690. babbabaaababbab 691. babbababababbab 692. babbabbabbabbab 693. babbabbbbbabbab 694. babbbaaaaabbbab 695. babbbaabaabbbab 696. babbbabababbbab 697. babbbabbbabbbab 698. babbbbaaabbbbab 699. babbbbababbbbab 700. babbbbbabbbbbab 701. babbbbbbbbbbbab 702. bbaaaaaaaaaaabb 703. bbaaaaabaaaaabb 704. bbaaaababaaaabb 705. bbaaaabbbaaaabb 706. bbaaabaaabaaabb 707. bbaaabababaaabb 708. bbaaabbabbaaabb 709. bbaaabbbbbaaabb 710. bbaabaaaaabaabb 711. bbaabaabaabaabb 712. bbaababababaabb 713. bbaababbbabaabb 714. bbaabbaaabbaabb 715. bbaabbababbaabb 716. bbaabbbabbbaabb 717. bbaabbbbbbbaabb 718. bbabaaaaaaababb 719. bbabaaabaaababb 720. bbabaababaababb 721. bbabaabbbaababb 722. bbababaaabababb 723. bbababababababb 724. bbababbabbababb 725. bbababbbbbababb 726. bbabbaaaaabbabb 727. bbabbaabaabbabb 728. bbabbabababbabb 729. bbabbabbbabbabb 730. bbabbbaaabbbabb 731. bbabbbababbbabb 732. bbabbbbabbbbabb 733. bbabbbbbbbbbabb 734. bbbaaaaaaaaabbb 735. bbbaaaabaaaabbb 736. bbbaaababaaabbb 737. bbbaaabbbaaabbb 738. bbbaabaaabaabbb 739. bbbaabababaabbb 740. bbbaabbabbaabbb 741. bbbaabbbbbaabbb 742. bbbabaaaaababbb 743. bbbabaabaababbb 744. bbbabababababbb 745. bbbababbbababbb 746. bbbabbaaabbabbb 747. bbbabbababbabbb 748. bbbabbbabbbabbb 749. bbbabbbbbbbabbb 750. bbbbaaaaaaabbbb 751. bbbbaaabaaabbbb 752. bbbbaababaabbbb 753. bbbbaabbbaabbbb 754. bbbbabaaababbbb 755. bbbbababababbbb 756. bbbbabbabbabbbb 757. bbbbabbbbbabbbb 758. bbbbbaaaaabbbbb 759. bbbbbaabaabbbbb 760. bbbbbabababbbbb 761. bbbbbabbbabbbbb 762. bbbbbbaaabbbbbb 763. bbbbbbababbbbbb 764. bbbbbbbabbbbbbb 765. bbbbbbbbbbbbbbb 766. aaaaaaaaaaaaaaaa 767. aaaaaaabbaaaaaaa 768. aaaaaabaabaaaaaa 769. aaaaaabbbbaaaaaa 770. aaaaabaaaabaaaaa 771. aaaaababbabaaaaa 772. aaaaabbaabbaaaaa 773. aaaaabbbbbbaaaaa 774. aaaabaaaaaabaaaa 775. aaaabaabbaabaaaa 776. aaaababaababaaaa 777. aaaababbbbabaaaa 778. aaaabbaaaabbaaaa 779. aaaabbabbabbaaaa 780. aaaabbbaabbbaaaa 781. aaaabbbbbbbbaaaa 782. aaabaaaaaaaabaaa 783. aaabaaabbaaabaaa 784. aaabaabaabaabaaa 785. aaabaabbbbaabaaa 786. aaababaaaababaaa 787. aaabababbababaaa 788. aaababbaabbabaaa 789. aaababbbbbbabaaa 790. aaabbaaaaaabbaaa 791. aaabbaabbaabbaaa 792. aaabbabaababbaaa 793. aaabbabbbbabbaaa 794. aaabbbaaaabbbaaa 795. aaabbbabbabbbaaa 796. aaabbbbaabbbbaaa 797. aaabbbbbbbbbbaaa 798. aabaaaaaaaaaabaa 799. aabaaaabbaaaabaa 800. aabaaabaabaaabaa 801. aabaaabbbbaaabaa 802. aabaabaaaabaabaa 803. aabaababbabaabaa 804. aabaabbaabbaabaa 805. aabaabbbbbbaabaa 806. aababaaaaaababaa 807. aababaabbaababaa 808. aabababaabababaa 809. aabababbbbababaa 810. aababbaaaabbabaa 811. aababbabbabbabaa 812. aababbbaabbbabaa 813. aababbbbbbbbabaa 814. aabbaaaaaaaabbaa 815. aabbaaabbaaabbaa 816. aabbaabaabaabbaa 817. aabbaabbbbaabbaa 818. aabbabaaaababbaa 819. aabbababbababbaa 820. aabbabbaabbabbaa 821. aabbabbbbbbabbaa 822. aabbbaaaaaabbbaa 823. aabbbaabbaabbbaa 824. aabbbabaababbbaa 825. aabbbabbbbabbbaa 826. aabbbbaaaabbbbaa 827. aabbbbabbabbbbaa 828. aabbbbbaabbbbbaa 829. aabbbbbbbbbbbbaa 830. abaaaaaaaaaaaaba 831. abaaaaabbaaaaaba 832. abaaaabaabaaaaba 833. abaaaabbbbaaaaba 834. abaaabaaaabaaaba 835. abaaababbabaaaba 836. abaaabbaabbaaaba 837. abaaabbbbbbaaaba 838. abaabaaaaaabaaba 839. abaabaabbaabaaba 840. abaababaababaaba 841. abaababbbbabaaba 842. abaabbaaaabbaaba 843. abaabbabbabbaaba 844. abaabbbaabbbaaba 845. abaabbbbbbbbaaba 846. ababaaaaaaaababa 847. ababaaabbaaababa 848. ababaabaabaababa 849. ababaabbbbaababa 850. abababaaaabababa 851. ababababbabababa 852. abababbaabbababa 853. abababbbbbbababa 854. ababbaaaaaabbaba 855. ababbaabbaabbaba 856. ababbabaababbaba 857. ababbabbbbabbaba 858. ababbbaaaabbbaba 859. ababbbabbabbbaba 860. ababbbbaabbbbaba 861. ababbbbbbbbbbaba 862. abbaaaaaaaaaabba 863. abbaaaabbaaaabba 864. abbaaabaabaaabba 865. abbaaabbbbaaabba 866. abbaabaaaabaabba 867. abbaababbabaabba 868. abbaabbaabbaabba 869. abbaabbbbbbaabba 870. abbabaaaaaababba 871. abbabaabbaababba 872. abbababaabababba 873. abbababbbbababba 874. abbabbaaaabbabba 875. abbabbabbabbabba 876. abbabbbaabbbabba 877. abbabbbbbbbbabba 878. abbbaaaaaaaabbba 879. abbbaaabbaaabbba 880. abbbaabaabaabbba 881. abbbaabbbbaabbba 882. abbbabaaaababbba 883. abbbababbababbba 884. abbbabbaabbabbba 885. abbbabbbbbbabbba 886. abbbbaaaaaabbbba 887. abbbbaabbaabbbba 888. abbbbabaababbbba 889. abbbbabbbbabbbba 890. abbbbbaaaabbbbba 891. abbbbbabbabbbbba 892. abbbbbbaabbbbbba 893. abbbbbbbbbbbbbba 894. baaaaaaaaaaaaaab 895. baaaaaabbaaaaaab 896. baaaaabaabaaaaab 897. baaaaabbbbaaaaab 898. baaaabaaaabaaaab 899. baaaababbabaaaab 900. baaaabbaabbaaaab 901. baaaabbbbbbaaaab 902. baaabaaaaaabaaab 903. baaabaabbaabaaab 904. baaababaababaaab 905. baaababbbbabaaab 906. baaabbaaaabbaaab 907. baaabbabbabbaaab 908. baaabbbaabbbaaab 909. baaabbbbbbbbaaab 910. baabaaaaaaaabaab 911. baabaaabbaaabaab 912. baabaabaabaabaab 913. baabaabbbbaabaab 914. baababaaaababaab 915. baabababbababaab 916. baababbaabbabaab 917. baababbbbbbabaab 918. baabbaaaaaabbaab 919. baabbaabbaabbaab 920. baabbabaababbaab 921. baabbabbbbabbaab 922. baabbbaaaabbbaab 923. baabbbabbabbbaab 924. baabbbbaabbbbaab 925. baabbbbbbbbbbaab 926. babaaaaaaaaaabab 927. babaaaabbaaaabab 928. babaaabaabaaabab 929. babaaabbbbaaabab 930. babaabaaaabaabab 931. babaababbabaabab 932. babaabbaabbaabab 933. babaabbbbbbaabab 934. bababaaaaaababab 935. bababaabbaababab 936. babababaabababab 937. babababbbbababab 938. bababbaaaabbabab 939. bababbabbabbabab 940. bababbbaabbbabab 941. bababbbbbbbbabab 942. babbaaaaaaaabbab 943. babbaaabbaaabbab 944. babbaabaabaabbab 945. babbaabbbbaabbab 946. babbabaaaababbab 947. babbababbababbab 948. babbabbaabbabbab 949. babbabbbbbbabbab 950. babbbaaaaaabbbab 951. babbbaabbaabbbab 952. babbbabaababbbab 953. babbbabbbbabbbab 954. babbbbaaaabbbbab 955. babbbbabbabbbbab 956. babbbbbaabbbbbab 957. babbbbbbbbbbbbab 958. bbaaaaaaaaaaaabb 959. bbaaaaabbaaaaabb 960. bbaaaabaabaaaabb 961. bbaaaabbbbaaaabb 962. bbaaabaaaabaaabb 963. bbaaababbabaaabb 964. bbaaabbaabbaaabb 965. bbaaabbbbbbaaabb 966. bbaabaaaaaabaabb 967. bbaabaabbaabaabb 968. bbaababaababaabb 969. bbaababbbbabaabb 970. bbaabbaaaabbaabb 971. bbaabbabbabbaabb 972. bbaabbbaabbbaabb 973. bbaabbbbbbbbaabb 974. bbabaaaaaaaababb 975. bbabaaabbaaababb 976. bbabaabaabaababb 977. bbabaabbbbaababb 978. bbababaaaabababb 979. bbabababbabababb 980. bbababbaabbababb 981. bbababbbbbbababb 982. bbabbaaaaaabbabb 983. bbabbaabbaabbabb 984. bbabbabaababbabb 985. bbabbabbbbabbabb 986. bbabbbaaaabbbabb 987. bbabbbabbabbbabb 988. bbabbbbaabbbbabb 989. bbabbbbbbbbbbabb 990. bbbaaaaaaaaaabbb 991. bbbaaaabbaaaabbb 992. bbbaaabaabaaabbb 993. bbbaaabbbbaaabbb 994. bbbaabaaaabaabbb 995. bbbaababbabaabbb 996. bbbaabbaabbaabbb 997. bbbaabbbbbbaabbb 998. bbbabaaaaaababbb 999. bbbabaabbaababbb 1000. bbbababaabababbb