Task: Text to Code
Input (English): Step 1: For each row in Lives_in table, find corresponding rows in Student table and in Dorm table.
Step 2: find dorm_name of the results of step 1 whose LName equals Smith
Output (English): SELECT T2.dorm_name FROM Student AS T1 JOIN Dorm AS T2 JOIN Lives_in AS T3 ON T1.StuID = T3.stuid AND T3.dormid = T2.dormid WHERE T1.LName = "Smith"