circular linked list and wildcard generator