// Path: graph/DepthFirstTraversal.java
// public class DepthFirstTraversal extends Traversal {
// 
//     /** A depth-first Traversal of G, using FRINGE as the fringe. */
//     protected DepthFirstTraversal(Graph G) {
//         super(G, Collections.asLifoQueue(new ArrayDeque<Integer>()));
//     }
// 
//     @Override
//     protected boolean visit(int v) {
//         return super.visit(v);
//     }
// 
//     @Override
//     protected boolean postVisit(int v) {
//         return super.postVisit(v);
//     }
// 
//     @Override
//     protected boolean shouldPostVisit(int v) {
//         return true;
//     }
// }
// 
// Path: make/Main.java
// static void error(String format, Object... args) {
//     throw new IllegalArgumentException(String.format(format, args));
// }


import graph.DepthFirstTraversal;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.Set;
import java.util.Scanner;
import java.io.FileNotFoundException;
import static java.util.Arrays.asList;
import static make.Main.error;

    /** Return my dependence graph. */
    final Depends getGraph() {
        return _depends;
    }

    /** Return the initial age of TARGET, if it exists, or null if it
     *  does not. */
    final Integer getInitialAge(String target) {
        return _ages.get(target);
    }

    /** Returns the current time (to be attached to rebuilt targets). */
    final int getCurrentTime() {
        return _currentTime;
    }

    /** The current time.  Should be no earlier than the time on the
     *  latest file. */
    private int _currentTime;
    /** The makefile dependency graph. */
    private Depends _depends = new Depends();
    /** Mapping of target names to their ages. */
    private HashMap<String, Integer> _ages = new HashMap<>();
    /** Mapping of target names to their Rules. */
    private HashMap<String, Rule> _targets = new HashMap<>();
    /** Depth-first traversal of my vertices. */
    private MakeTraversal _traversal;

    /** Traversal for make dependency graph. */
// Path: graph/DepthFirstTraversal.java
// public class DepthFirstTraversal extends Traversal {
// 
//     /** A depth-first Traversal of G, using FRINGE as the fringe. */
//     protected DepthFirstTraversal(Graph G) {
//         super(G, Collections.asLifoQueue(new ArrayDeque<Integer>()));
//     }
// 
//     @Override
//     protected boolean visit(int v) {
//         return super.visit(v);
//     }
// 
//     @Override
//     protected boolean postVisit(int v) {
//         return super.postVisit(v);
//     }
// 
//     @Override
//     protected boolean shouldPostVisit(int v) {
//         return true;
//     }
// }
// 
// Path: make/Main.java
// static void error(String format, Object... args) {
//     throw new IllegalArgumentException(String.format(format, args));
// }


// Path: make/Maker.java
import graph.DepthFirstTraversal;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.Set;
import java.util.Scanner;
import java.io.FileNotFoundException;
import static java.util.Arrays.asList;
import static make.Main.error;


    /** Return my dependence graph. */
    final Depends getGraph() {
        return _depends;
    }

    /** Return the initial age of TARGET, if it exists, or null if it
     *  does not. */
    final Integer getInitialAge(String target) {
        return _ages.get(target);
    }

    /** Returns the current time (to be attached to rebuilt targets). */
    final int getCurrentTime() {
        return _currentTime;
    }

    /** The current time.  Should be no earlier than the time on the
     *  latest file. */
    private int _currentTime;
    /** The makefile dependency graph. */
    private Depends _depends = new Depends();
    /** Mapping of target names to their ages. */
    private HashMap<String, Integer> _ages = new HashMap<>();
    /** Mapping of target names to their Rules. */
    private HashMap<String, Rule> _targets = new HashMap<>();
    /** Depth-first traversal of my vertices. */
    private MakeTraversal _traversal;

    /** Traversal for make dependency graph. */
    class MakeTraversal extends DepthFirstTraversal {