First attempt at a restricted matcher with a maximum running time of 3s.