A list of strings of lowercase English alphabets is given.
It is followed by a list of operations, where each operation is denoted by
(a, b, c): append character c to all elements in the range a to b
c can be of three types (#,$,%), and if c is already appended to an element, adding again won't affect.
We need to find minimum number of operations required actually to get the final output.
Note: All operations must be done in the given order. We can decide to skip it or not.
Given list of strings: a, b, c, d
1. 1 2 $
2. 1 4 $
It is because 2 would bring the final output itself.