Text this: Algorithm for constructing routing to ensure fault tolerance of the communication network