Below is the list of tables from the database along with their columns and datatype. Need to generate an accurate SQL query for the question.
Only use the columns present in the respective table. Only use the columns which are required to generate the SQL query. Only use table joins if required and not otherwise.

### Tables ###
TABLE: CREATE TABLE ship ( ship_id number, name text, type text, built_year number, class text, flag text )
TABLE: CREATE TABLE captain ( captain_id number, name text, ship_id number, age text, class text, rank text )

### Question ###
Find the name of the ships that are steered by both a captain with Midshipman rank and a captain with Lieutenant rank.

### Accurate SQL ###

SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Midshipman' INTERSECT SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Lieutenant'