Input generated with this leads to O(n^2) in time and space (output size): ``` $ python -c 'N=1000; print("[x]: " + "x" * N + "\n[x]" * N)' ```