The characterization of bipartite graphs in terms of odd cycles