Input: he took a dog from the shelf
he took a book from the shelf

Output: first