i need to write a function that will display all possible strings of lowercase letters, for instance..

a
b
c
d
...
x
y
z
aa
ab
ac
ad
...


and so forth (up to say, 5 characters). i'd really appreciate source code, but if someone can just point me in the right direction, i would be greatful.

i know it can be done with loops, but i'd prefer a way which is a little more tactful.

can this be done with recursion?

anyway, i appreciate any help i can get.