We consider a problem of synthesis of three-valued logic functions by logic networks in the special basis including constants, two functions on one variable, and one partially defined function on three variables. Some restrictions are placed on structure of networks. These networks represent a mathematical model of three-valued MDS circuits. We obtain that the minimal complexity of implementation of Sheffer functions in the class of the networks considered equals 5. We find all possible kinds of minimal networks.