1. Borrowing books: A, B and C.
2. Borrow 2 books: AA, BB, CC, AB, AC, BC, 6 kinds.
3. Borrow three books: AAA, BBB, CCC, ABB, ACC, BCC, AAB, AAC, BBC, ABC, 10.
2×(3+6+ 10)+ 1=39