first half of 1.c (multiple goal bfs and dfs). added new test case
layouts