This solution offers the smoothest voice-leading while breaking the least amount of rules. Often with part writing, it so happens that rules must be broken in order to get through the exercise or music, and one should always remember that the contour of each line - it's smoothness - is always paramount. Keeping these thoughts in mind, I will walk through my solution.
In order to smoothly get out of the repetition of first-inversion chords, I used voice exchange to create step-wise contrary motion in the Bass and Tenor voices. You will note that the intervening chord - the Cb Major (the IV in Gb major) - has in its a voicing a doubled third (normally not allowable). However, since both voices move by step through the third of the chord, it is de-emphasized and therefore poses minimal problems.
Moving into the last measure, one will note that I have doubled the fifth in the soprano and alto on the fifth chord. Given that emphasis is on smooth voice-leading, doubling the fifth (the least harmonically active pitch) afford the best solution to the alternatives, which would seem harsh and unprepared.
On the last chord, it is perfectly acceptable to triple the root if it is the last chord of a piece or exercise, and in my solution I offer two equally viable solutions: one may either resolve the tenor line upwards to the octave or may skip by a 3rd down to the fifth degree of the chord. In this circumstance of a frustrated leading tone, it is acceptable as the leading tone is resolved by step in the alto voice - thus preserving the integrity of the line.
Also note that the parallel fourths in the soprano and alto from chords three->four are acceptable as they are supported by consonant intervals in relation to the bass. Lastly, note that none of the voices move larger than a 3rd at any given point, thus ensuring smooth voice-leading and improved sing-ability.