1900: Having had enough of living with her late husband's mother and maiden aunt, young widow Lucy Muir decides to move with her young daughter Anna to a place of her own by the sea. Her eye falls on the picturesque coastal village of Whitecliff where she finds a unique house Gull Cottage. The leasing agent tries his hardest to dissuade Lucy from taking the cottage, telling her that all the previous tenants have moved out just as quickly as they moved in. Lucy soon discovers the reason for the landlord's warnings when she sees windows and doors open on their own, candles blown out and hears disembodied laughter. Unlike the previous tenants, strong-willed Lucy refuses to be scared off by the hauntings and demands that the ghost reveal himself. He appears and Lucy recognises him immediately as Captain Daniel Gregg, the cottage's previous owner whose portrait hangs above the mantelpiece. The ghost agrees to restrict himself to the master bedroom if Lucy will move his portrait into the room and Lucy agrees including sharing the room. Initially hostile towards one another, Lucy and the Captain develop a mutual respect that quickly becomes admiration. When Lucy eventually finds herself in financial difficulties, in order to raise money the Captain (or Daniel as he asks her to call him) suggests they publish a memoir of his life. While writing the book, Daniel dictates and Lucy objects to the language and phraseology and through the banter they become closer. When the book is finally finished and ready to be published, Lucy realises she's fallen in love with Daniel, and he with her. Both know that the situation is hopeless, and Daniel tells her that he wants her to experience life including meeting real men. Lucy reluctantly agrees, and while visiting a publisher in London, Lucy meets the smooth-talking Miles Fairlie, an author of children's books. Miles takes a fancy to the attractive widow, assists her and tries to court her. Daniel is not at all happy at Lucy's choice and tries to warn her off but Lucy is enchanted by Miles and thinks Daniel is just being jealous. When Lucy ultimately declares her intention to marry Miles, Daniel decides to disappear from Lucy's life permanently. While Lucy is asleep, Daniel bids her a touching farewell and tells her that when she wakes up she will remember him only as a dream. Shortly afterwards, Lucy is devastated to discover that Miles is already married with a family and was just stringing her along and she was not the first.The years pass, and Lucy continues to live at Gull Cottage with no memory of Daniel until one day Anna, who is now grown up and engaged, mentions that as a little girl she used to regularly spend time with the ghost of Captain Gregg. This jogs something in Lucy's memory when she realizes they both had the same experience so it wasn't just her own dreams. For the next thirty years Lucy resides in Gull Cottage while Anna grows up and has children of her own. One night Lucy tells her maid that she is feeling unwell, drops her night time drink and falls unconscious in her armchair. Daniel appears, takes her hands and tells her that she'll never be tired again and lifts her out of the chair. Lucy, young again, takes Daniel's arm and the two ghosts walk out into the night, together at last.
Output: Question: Who does Lucy intend to marry?, Answer: Miles