Arcesium Interview Question

Writing a recursive SQL query specific to the data given.