Sure, here is the test case generator for the given problem statement:

```python
import random
import string

def tcgen():
    # Generate a random string of lowercase letters with length between 1 and 1000
    length_of_str = random.randint(1, 1000)
    str_ = ''.join(random.choices(string.ascii_lowercase, k=length_of_str))
    
    # Generate a random number of commands between 1 and 100
    q = random.randint(1, 100)
    
    commands = []
    for _ in range(q):
        command_type = random.choice(['print', 'reverse', 'replace'])
        
        a = random.randint(0, length_of_str - 1)
        b = random.randint(a, length_of_str - 1)
        
        if command_type == 'print':
            command = f"print {a} {b}"
        
        elif command_type == 'reverse':
            command = f"reverse {a} {b}"
        
        elif command_type == 'replace':
            # Length of p should be b - a + 1
            length_of_p = b - a + 1
            p = ''.join(random.choices(string.ascii_lowercase, k=length_of_p))
            command = f"replace {a} {b} {p}"
        
        commands.append(command)
    
    return str_, q, commands

# Example usage:
str_, q, commands = tcgen()
print(str_)
print(q)
for command in commands:
    print(command)
```

### Explanation:

1. **String Generation**:
   - A random string `str_` of lowercase letters is generated with a length between 1 and 1000.

2. **Commands Generation**:
   - A random number `q` between 1 and 100 is chosen to determine the number of commands.
   - For each command, a type is randomly selected from the set `{'print', 'reverse', 'replace'}`.
   - The start index `a` is randomly chosen between `0` and `length_of_str - 1`.
   - The end index `b` is randomly chosen between `a` and `length_of_str - 1`.
   - For the `replace` command, a string `p` is generated such that its length matches `b - a + 1`.

### Note:
- The function `tcgen()` returns the generated string `str_`, the number of commands `q`, and a list of commands `commands`.
- An example usage is shown at the end to print out the generated test case.

This generator should provide a wide variety of test cases covering different scenarios for the problem statement.