Solution by Freddie B
