The function replaces the first occurrence of the lowercase letter "w" with the uppercase letter "X" in the input string.

[CODE]:
```python
def f(x: str) -> str:
    return x.replace("w", "X", 1)
```