An integer l (1 ≤ l ≤ 100,000) and an integer d (0 ≤ d ≤ 5,000)
Three strings of length l consisting of only lower and upper case alphabets.
The input ends with a line containing two zeros, which should not be processed.

### Example Input:

```
3 1
ACM
IBM
ICM
5 2
iwzwz
iziwi
zwizi
0 0
```

### Function Signature:
Write a function f(inputs) that takes in the input.
def f(inputs: List[Tuple[int, int, str, str, str]]):
    '''
    inputs: a list of tuples, each containing:
        - an integer l
        - an integer d
        - a string
        - a string
        - a string
    '''