Complex sentence: Lucca managed, at first as a democracy, and after 1628 as an oligarchy, to maintain its independence alongside of Venice and Genoa, and painted the word "Libertas" on its banner until the French Revolution in 1789.
Split into simpler sentences: Lucca managed, at first as a democracy, and after 1628 as an oligarchy, to maintain its independence--alongside with Venice and Genoa. It painted the word "Libertas" on its banners, until the French Revolution in 1789.