Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- l = int(input())
- for a in range(1, n + 1):
- for b in range(1, n + 1):
- for c in range(97, 97 + l):
- for d in range(97, 97 + l):
- for e in range(max(a, b) + 1, n + 1):
- print(f"{a}{b}{chr(c)}{chr(d)}{e}", end=' ')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement