The function replaces the first occurrence of the letter 'a' with the letter 'P' in the input string. If there's no 'a' in the input, the output is the same as the input.

[CODE]:
```python
def function_approx(input_str):
    return input_str.replace('a', 'P', 1)
```