Dirty solution, passes tests.