Company: nvidia
Difficulty: medium
Flaky Test Detection A nightly job runs an automated test suite. Most tests are stable: they either pass every night or fail every night. A few are **flaky** - they pass sometimes and fail sometimes for reasons that are not real bugs - and the build team wants those identified so they can be quarantined. You are given the recent run history of `n` tests. Every test has the same number of runs, `R`, listed oldest first. Each run is recorded as the character `P` (passed) or `F` (failed). A **flip** occurs between two consecutive runs of the same test when the two runs differ, that is `P` followed by `F`, or `F` followed by `P`. A test is **flaky** if there is at least one block of `W` consecutive runs of that test containing **3 or more flips**. Report the names of all flaky tests in ascending order. If no test is flaky, report the single word `NONE`. Input Format The first line contains three integers `n`, `R` and `W`: the number of tests, the number of runs recorded for each test, and