context: Annie Walker (Kristen Wiig) is a single woman in her mid 30s, living in Milwaukee, Wisconsin. After her bakery failed, she lost her boyfriend and all of her savings, and now works in a jewelers store selling engagement rings. Although her flaky mother (Jill Clayburgh) encourages her to return home, Annie rents a bedroom from British immigrant Gil (Matt Lucas) and his lazy overweight sister Brynn (Rebel Wilson). She has a sexual no-strings-attached relationship with the self-absorbed Ted (Jon Hamm) but hopes for something more. Only her friendship with Lillian Donovan (Maya Rudolph) keeps her sane.Lillian becomes engaged to a wealthy banker living in Chicago and asks Annie to be her maid of honor. At the engagement party at Lillian's house, Annie meets her fellow bridesmaids: Lillian's cynical cousin Rita (Wendi McLendon-Covey), idealistic friend Becca (Ellie Kemper), raunchy future sister-in-law Megan (Melissa McCarthy) and Helen Harris, III (Rose Byrne), the beautiful but vain wife of Lillian's fiance's boss. Helen and Annie take an instant dislike to each other as they are both become immediately jealous of the other's friendship with Lillian, but Lillian persuades them to spend time together. During a game of doubles tennis, Annie and Helen are both hyper competitive, deliberately hitting each other with their volleys multiple times.A few days later, Annie takes Lillian and the bridesmaids to a Brazilian restaurant for lunch before going to a chic bridal gown studio. While Lillian is in the restroom, Annie suggests a Parisian themed bridal shower, but Helen thinks this is a bad idea. At the bridal gown studio, Helen again uses her influence to gain them access because Annie did not realize that reservations were needed. However, everyone except Helen (who did not eat the meat at the restaurant) becomes ill with food poisoning. While everyone else becomes ill, Helen orders for everyone the bridesmaids dress that she liked the best.Worried about her finances, Annie suggests a bachelorette party at Lillian's parents' beach house. Helen overrules her and books a trip to Las Vegas. Due to her pride and ego, Annie refuses to allow Helen to buy a first class ticket for her and sits in coach. Because Annie is afraid to fly, Helen gives her sedatives and alcohol. This makes Annie inebriated and paranoid, and her outbursts cause the plane to land in Caspar, Wyoming, where she, Lillian and the bridesmaids are escorted off the plane and the bachelorette party plans are thus canceled. On the bus trip back to Milwaukee, Annie tries to apologize but Lillian announces that she wants Helen to take over planning the shower and wedding.Annie continues to hope for a relationship with Ted, but begins flirting with Officer Nathan Rhoads (Chris O'Dowd), a friendly traffic cop who earlier had let her off without a ticket for broken taillights. Nathan encourages her to open a new bakery, but Annie refuses; her business's failure was so painful that she has given up baking entirely. After spending the night together, Nathan buys baking supplies so Annie can make them a delicious breakfast. Offended, Annie leaves. At her apartment, Gil and Brynn tell her she has to move out. With nowhere else to go, she moves back in with her mother.Annie travels back to Chicago for the bridal shower at Helen's house. Helen has created an elaborate version of Annie's Parisian theme, then upstages Annie's heartfelt, handmade shower gift by giving Lillian a trip to Paris to be fitted for her wedding gown by one of the world's top designers. Enraged that Helen has taken credit for the Parisian theme, Annie throws a temper tantrum and is kicked out of the shower. Lillian tells her not to come to the wedding either. On the way home, Annie's car breaks down. Nathan answers the emergency call and tells Annie how much she hurt him and not to contact him again. Ted comes to pick Annie up but, when he expects her to perform oral sex on him on the way home, she breaks off the relationship and walks home.Over the next several days, Annie becomes reclusive, refusing to leave her mother's house and watching television obsessively. Megan finds her and tells her to stop feeling sorry for herself. Annie realizes her errors and tries to make amends with Nathan by baking him a cake. But he appears to leave it on his doorstep for raccoons to eat.On the day of the wedding, which Annie doesn't intend to attend, Helen appears on the doorstep, begging for help in finding Lillian who has gone missing. Helen tearfully explains how lonely she feels and apologizes for all she has done to hurt Annie out of jealousy. They pull up alongside Nathan in his police car and after some persuasion, he begrudgingly helps Annie and Helen find Lillian at her own apartment. Lillian had gone there distressed by the micromanaging Helen had done in planning everything and her fear that Annie will have no one to be with. Annie tells her everything will be fine and helps her get ready for the wedding.Annie resumes her place as maid of honor at the wedding, which Helen has arranged to include neon signs, fireworks and an appearance by Wilson Phillips. After the wedding, Helen again apologizes to Annie and hopes they can be friends in the future. Realizing that Annie and Nathan were falling in love, Helen arranged for him to pick Annie up after the wedding. He takes her home in his squad car, lights flashing and siren wailing.
question: Who does Annie have a no-strings-attached sexual relationship with?
answer: Ted