We introduce a new network structure named a (S, T)-maximal directed acyclic graph (DAG). A (S, T)-maximal DAG is a mixed graph which allows both directed edges and undirected edges. It is constructed, for any given connected undirected network with a set of S nodes specified as source nodes and a set of T nodes specified as sink nodes, by assigning directions to as many undirected edges as possible (i.e., by changing undirected edges into directed edges) so that the following conditions are satisfied: (i) each node specified as a source node has at least one outgoing edge but no incoming edge, (ii) each node specified as a sink node has at least one incoming edge but no outgoing edge, (iii) each other node has no directed edge or has both outgoing and incoming edges, and (iv) no directed cycle (consisting only of directed edges) exists. This maximality implies that changing any more undirected edges to directed edges violates these conditions, for example, a source node has an incoming edge, a node which is specified as neither a source node nor a sink node has only outgoing edges or incoming edges other than undirected edges, or a directed cycle is created in the network. In this paper, we propose a self-stabilizing algorithm which constructs a (1,1)-maximal DAG in any connected network with a specified source node and a specified sink node by assigning directions to as many edges as possible.