US supermarket chain The Great Atlantic & Pacific Tea Co (A&P) has posted a fourth-quarter loss on flat sales, compared to a year-earlier profit.