Macy's Swings to 3Q Profit