Answer :

Answer is in the attachment below. Could've been simplified further, but it would've been a tedious task.
View image Аноним