```python
def permute_string(str):
    """
    Prints all permutations of a given string, including duplicates that arise
    from swapping identical characters.
    """
    
    def _permute_recursive(char_list, start, end):
        """
        A recursive helper function to generate and print permutations.
        
        :param char_list: A list of characters to permute.
        :param start: The starting index for the current permutation step.
        :param end: The ending index of the list.
        """
        # Base case: If the start index has reached the end, we have a full permutation.
        if start == end:
            print("".join(char_list))
        else:
            # Iterate through the rest of the list to generate permutations.
            for i in range(start, end + 1):
                # Swap the current element with the element at the start index.
                char_list[start], char_list[i] = char_list[i], char_list[start]
                
                # Recursively call the function for the next position.
                _permute_recursive(char_list, start + 1, end)
                
                # Backtrack: Swap the elements back to their original positions
                # to explore other possibilities in the loop.
                char_list[start], char_list[i] = char_list[i], char_list[start]

    n = len(str)
    if n == 0:
        # If the string is empty, there are no permutations to print.
        # Some might consider an empty string as one permutation.
        # Printing a blank line for consistency with non-empty strings.
        print("")
        return
        
    char_list = list(str)
    _permute_recursive(char_list, 0, n - 1)

```