Added MaxFlow code to Template.