An integer S (2 ≤ S ≤ 1000), representing the length of a string.
A string of size S, consisting of digits '0'-'9' and characters 'T', 'L', 'U', 'R', 'D'.

### Example Input:

```
5R2D
```

### Function Signature:
Write a function f(S, input_string) that takes in the input.
def f(S: int, input_string: str):
    '''
    S: an integer
    input_string: a string of size S
    '''