Basic first solution - will try to optimise but may not have time to before the deadline. This is my first time entering a tournament; I had a lot of fun figuring out a way to complete this puzzle!