diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 7f49610..f220ff2 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -11,8 +11,8 @@
-
-
+
+
@@ -54,7 +54,7 @@
-
+
@@ -124,7 +124,7 @@
-
+
@@ -175,6 +175,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -277,10 +287,10 @@
+
-
@@ -302,11 +312,11 @@
-
+
-
+
@@ -315,30 +325,30 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
@@ -351,10 +361,10 @@
-
+
-
+
diff --git a/day20/day20.go b/day20/day20.go
new file mode 100644
index 0000000..f11cc3c
--- /dev/null
+++ b/day20/day20.go
@@ -0,0 +1,111 @@
+package main
+
+import (
+ "AoC2020/helper"
+ "fmt"
+ "os"
+ "regexp"
+ "strconv"
+ "strings"
+)
+
+var lineBreak = "\n"
+
+type tile struct {
+ neighbourID [4]int
+ edges [4]string
+}
+
+func main() {
+ args := os.Args[1:]
+ input, err := helper.GetFile(args[0])
+ if err != nil {
+ fmt.Println(err)
+ }
+ tileInput := strings.Split(input, lineBreak+lineBreak)
+ fmt.Println(len(tileInput))
+ tiles := getTiles(tileInput)
+ corners := findCorners(tiles)
+ fmt.Println(corners)
+ product := corners[0]
+ for _,val := range corners[1:]{
+ product *= val
+ }
+ fmt.Println(product)
+}
+
+func getTiles(input []string) map[int][4]string{
+ var tiles = make(map[int][4]string)
+ for _, val := range input {
+ id, edges := getTile(val)
+ fmt.Printf("ID:%v \n",id )
+ tiles[id] = edges
+ }
+ return tiles
+}
+
+func getTile(input string) (int, [4]string) {
+ tilesRow := strings.Split(input, lineBreak)
+ var edges [4]string
+ edges[0] = tilesRow[1]
+ edges[2] = tilesRow[len(tilesRow)-1]
+ for _, val := range tilesRow[1:] {
+ edges[3] = edges[3]+val[0:1]
+ edges[1] = edges[1]+val[len(val)-1:]
+ }
+ r, _ := regexp.Compile("[0-9]{4}")
+ number, _ := strconv.Atoi(r.FindString(tilesRow[0]))
+ return number, edges
+}
+
+func getAllEdges(tiles map[int][4]string, id int) []string{
+ var edges []string
+ for key,val := range tiles {
+ if key != id {
+ for _, edge := range val {
+ edges = append(edges, edge)
+ edges = append(edges, reverse(edge))
+ }
+ }
+ }
+ return edges
+}
+
+func findCorners(tiles map[int][4]string) []int{
+ var cornerIds []int
+ for key,val := range tiles{
+ edgesOfOtherTiles := getAllEdges(tiles,key)
+ fmt.Printf("ID: %v, MatchingEdges: %v \n",key,countMatchingEges(edgesOfOtherTiles,val))
+ if countMatchingEges(edgesOfOtherTiles,val) <= 2{
+ cornerIds= append(cornerIds,key)
+ }
+ }
+ return cornerIds
+}
+
+func countMatchingEges(allEdges []string, tileEdges [4]string) int{
+ count := 0
+ for _, val := range tileEdges{
+ if hasMatchingEdge(allEdges,val){
+ count ++
+ }
+ }
+ return count
+}
+
+func hasMatchingEdge(edges []string, edge string) bool {
+ for _, val := range edges {
+ if val == edge{
+ return true
+ }
+ }
+ return false
+}
+
+func reverse(s string) string {
+ runes := []rune(s)
+ for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
+ runes[i], runes[j] = runes[j], runes[i]
+ }
+ return string(runes)
+}
diff --git a/day20/day20Input.txt b/day20/day20Input.txt
new file mode 100644
index 0000000..6d7bb8b
--- /dev/null
+++ b/day20/day20Input.txt
@@ -0,0 +1,1727 @@
+Tile 1913:
+##..#....#
+.#.#.#.###
+#...##.##.
+.....#.#.#
+.#......##
+.........#
+#...###..#
+.#..#.....
+.##...#..#
+#.#...#...
+
+Tile 2579:
+##...####.
+##..#....#
+...#...#.#
+#.....###.
+##..#...##
+#....#..#.
+.#.....###
+.##...#...
+#.........
+...##.....
+
+Tile 1531:
+.......###
+.#....####
+.#.#.#...#
+....#..#.#
+.#.#.##..#
+.#.#.#...#
+#.##...###
+##..#.....
+#...#.....
+##.##.#..#
+
+Tile 1493:
+#.##.#.#..
+#.#..#.##.
+..#.....#.
+#.#.#....#
+....#....#
+...#####..
+#####.#.#.
+#.##..##..
+..#.....##
+.##..#.###
+
+Tile 3109:
+########.#
+......#.##
+#....#...#
+##.#.##...
+....#.#...
+#####...##
+....#....#
+..##...###
+.......#.#
+#.##.#....
+
+Tile 3343:
+###......#
+#..#.#..##
+...#....#.
+#.........
+..#.....##
+.....#####
+.....####.
+##.......#
+..#.......
+#.......##
+
+Tile 2609:
+####..#.##
+#.#..#....
+....###..#
+###..#..#.
+#.#......#
+##..#..#..
+#....#..#.
+#......###
+#..#....##
+.#..#.###.
+
+Tile 1823:
+###..#....
+..###...#.
+..#.###...
+...#.....#
+#....#.#.#
+.#..#.#..#
+#..##.#..#
+...##.....
+....#.#.#.
+###.##...#
+
+Tile 3391:
+....#...#.
+.#.#....#.
+#......#..
+#..#....#.
+#.##...#.#
+...##.####
+....##..#.
+##.#.#..##
+.....#..##
+#.#.#..#.#
+
+Tile 2753:
+....###..#
+.#..##.#.#
+...#......
+..#.###.##
+...#..##..
+....#.....
+#......#..
+#........#
+......#..#
+#..#.#...#
+
+Tile 3989:
+.#.###.#..
+#......##.
+.##......#
+.......###
+###....###
+##........
+##....#.#.
+...#.#..#.
+........#.
+###..#..#.
+
+Tile 1877:
+...###...#
+#.#..##...
+.##.###.#.
+#.#....#..
+#..#.#.##.
+#.......##
+####..#.#.
+##.#....##
+.##.......
+.#..##..##
+
+Tile 2729:
+#...####.#
+...#.....#
+.###......
+...#..#..#
+...#.#.#.#
+.#.....##.
+..#.....##
+........#.
+###.......
+#..##...##
+
+Tile 1031:
+##.#..####
+#.##.#....
+..#.......
+#......###
+.##.###.##
+#...#...#.
+#..##.....
+#..#.#.#..
+....###...
+....#.###.
+
+Tile 3803:
+#..#..##..
+...##..#..
+...#.#....
+#.....#..#
+#........#
+.#..#.#.##
+..#..#.#..
+#..#.#.#..
+..##..#.#.
+#####.###.
+
+Tile 3541:
+.##.#..#..
+.##..#...#
+.#.#..#...
+...#..##.#
+..#.....#.
+..##......
+.##......#
+##.......#
+.#..#.##.#
+###.#.##.#
+
+Tile 3821:
+.#.#.#....
+..#..##...
+#.##......
+..#...#.##
+#.####..#.
+##.##.#...
+..#..#....
+....#....#
+...###.#.#
+.#..#.#.##
+
+Tile 3853:
+#####..#.#
+.....#..##
+#...#.##.#
+.##....#.#
+#.#......#
+###...#.#.
+##....#.##
+#.#.#.#..#
+....###...
+##.#.#....
+
+Tile 1249:
+###...####
+..#....#..
+##.##....#
+.........#
+#.........
+.##.#.##..
+...#...##.
+..........
+##...#.#..
+##.####..#
+
+Tile 3673:
+...##..#.#
+.#..#..#.#
+###......#
+#.....###.
+..#.#.....
+#.#..#.###
+.#.##.##..
+.##....#..
+.#...##..#
+#.###..#.#
+
+Tile 3163:
+##.#.#####
+.##....#..
+####......
+#..#.#..##
+.#.#..##.#
+##.....#.#
+.......#..
+#...#.....
+..#..#....
+###.#...#.
+
+Tile 1759:
+###.#...##
+...#..#...
+###..###..
+.#.#...#.#
+.##...#...
+..###....#
+#.#.....#.
+......###.
+..#.####.#
+##..##..#.
+
+Tile 1831:
+.#...#...#
+...#.#..##
+#...#.#...
+#...##.#..
+.#.#.#..#.
+......##.#
+.........#
+#....##.#.
+......#..#
+#..#...##.
+
+Tile 2179:
+.###.....#
+..######.#
+....#....#
+...#....#.
+#.##..#...
+#..#....##
+.#..#.#..#
+..#.#....#
+#.#.#.....
+###.##...#
+
+Tile 2713:
+..###.#..#
+#.#.....#.
+#....#.#..
+#...##....
+##...#.#.#
+###..###.#
+.##..#..##
+.#...##.#.
+#.#.......
+#...#.....
+
+Tile 1889:
+....#....#
+......#.#.
+##.###...#
+.#..##...#
+##.##.#..#
+...#...##.
+#....#...#
+.......#..
+.#...#..##
+.#.####.##
+
+Tile 1999:
+##....##.#
+#..#.##.##
+..#...#...
+#.....#...
+......#...
+#.....#..#
+.#.##..#.#
+..#..##..#
+#...#..#..
+###..##..#
+
+Tile 2039:
+.#....####
+.##..#....
+.#.......#
+#........#
+#.......#.
+.#..#.....
+#.##......
+##....#..#
+.........#
+#.#......#
+
+Tile 2969:
+...#####..
+..#.#...##
+##.....#..
+##.....###
+#...#..###
+#..#....##
+#..##...##
+.........#
+#...##...#
+.#......##
+
+Tile 2153:
+.##..###..
+#.#..#..##
+.#####....
+#.#..#.###
+#.....#.##
+####..#.#.
+..........
+.#......#.
+...##...#.
+.#....####
+
+Tile 2837:
+..###.....
+###.#.###.
+.#....#...
+##.....###
+##.##..###
+..#..##.##
+.#....##..
+#..##.##..
+#..#......
+#..##...#.
+
+Tile 1619:
+##..###.##
+##....####
+.#..##.#..
+##.#...#..
+#..##.##..
+...#.#.#.#
+.....#.##.
+..##..#..#
+#..#..#..#
+......#.#.
+
+Tile 3943:
+.#.##.#.#.
+.......#.#
+.........#
+...#..#..#
+...#....##
+#.#.##....
+##.......#
+.#..#.##.#
+...##.#..#
+#.##....#.
+
+Tile 3389:
+#...#.##..
+#.##..#...
+#.#.#.....
+##...#...#
+##.....#..
+.#..###..#
+..###.....
+#.##..#.##
+####....##
+##.#.#####
+
+Tile 3631:
+##.###.###
+#...#.....
+..#.......
+#....#.###
+#.........
+#.#.......
+....##...#
+........#.
+#....#....
+.....#.#..
+
+Tile 2081:
+##..##.#..
+.##......#
+........##
+#.......##
+......##.#
+#....#....
+.#.#...##.
+....##..#.
+#.#..#####
+...#####..
+
+Tile 1579:
+##........
+.....#...#
+#......#..
+#..#.#...#
+...#..#...
+#.##....##
+...#......
+.#...#..#.
+..#....#.#
+.##...#...
+
+Tile 3019:
+.##..####.
+...#....##
+...##.#.#.
+#....#....
+.........#
+##..#..#.#
+...#.#...#
+.#.##.#.##
+##..#.....
+#..#..###.
+
+Tile 2089:
+##.##.#...
+..#.##...#
+##...#....
+#........#
+#..#.....#
+..######.#
+.......#..
+...#..##..
+#.#....#..
+...#.#####
+
+Tile 2297:
+#.#.###...
+#.##......
+#..#..#...
+......#..#
+#....#...#
+###.#..##.
+#....##.##
+.......#.#
+.........#
+.###.#.#..
+
+Tile 1373:
+#..#.####.
+........#.
+....#....#
+.##..#...#
+.#.....#.#
+#.....#...
+#..#..#..#
+.##...##.#
+##.......#
+.##..#.#..
+
+Tile 1259:
+...#..##.#
+....#.#..#
+#..#.##.##
+##..##....
+#..#.#..##
+#.#...#...
+..#......#
+...###.#.#
+..........
+.###..##..
+
+Tile 2411:
+.###..#.#.
+.#..#..#..
+#.....#..#
+.#.....#..
+##..#...#.
+.#........
+#...##....
+#.#..##...
+.....#.#.#
+....#.##..
+
+Tile 3359:
+.##..##.##
+..#.#..#.#
+#.......#.
+.#..###..#
+.#.....#..
+#.........
+...#.....#
+.##....#..
+.........#
+.#.##..#..
+
+Tile 2437:
+.#.....#..
+#.#.......
+....##.#..
+##.###.##.
+##.#....#.
+#...#....#
+##..##..##
+...#..#..#
+....##.#.#
+.##.#.#...
+
+Tile 1367:
+....#####.
+..#.#....#
+##......#.
+..##...##.
+..##..##.#
+..##.##..#
+#.#......#
+##...#...#
+.....#.#..
+##.###.###
+
+Tile 3533:
+##..####..
+##..#....#
+...#.....#
+#.##..####
+###..##...
+....###..#
+..#.....##
+.##.#..#..
+....#.##..
+##.#.##.##
+
+Tile 1451:
+.####.#...
+..##.#.#..
+...#.#....
+.........#
+....#...##
+##...##...
+..#...#...
+#...#.####
+...#.#.###
+#######...
+
+Tile 3457:
+#.##.###.#
+#..#.#....
+###.#....#
+.#....#.##
+.......##.
+#...####.#
+#.#####..#
+#.#..#..#.
+#.#.......
+.#.##.....
+
+Tile 2657:
+..#####..#
+......###.
+#.....#..#
+.#..###..#
+...#.##...
+#.....#..#
+#....#####
+....#..#..
+#.#.###..#
+.#..##.#..
+
+Tile 2347:
+#.##.#.###
+#...#....#
+..........
+#.#.#.....
+#....#....
+#..#...###
+#.##...#..
+#.....#..#
+#.#.###.#.
+#...###.##
+
+Tile 3923:
+#.####...#
+###...#.##
+......#..#
+..#..#..##
+#....#.#.#
+.........#
+.....#.#.#
+#..####..#
+....##.#..
+#..#...#..
+
+Tile 2593:
+####...#..
+#...####.#
+#......##.
+..#..#....
+#..#.....#
+...#......
+....#.....
+#.#...##.#
+.......#.#
+#.#####.#.
+
+Tile 1103:
+..##...#.#
+..#.....#.
+#....#...#
+...##....#
+#.#.....##
+.#.#.#.#..
+#....#####
+.#.#.#####
+.........#
+.##...#.#.
+
+Tile 2671:
+.##.##.#.#
+...#.#....
+##....#...
+#......#..
+.#....#.##
+........##
+..#...###.
+###...#...
+....#.#..#
+.#######.#
+
+Tile 3907:
+###....#..
+..##.....#
+..........
+##...#..##
+##..#..##.
+##..##..#.
+#.#.....##
+..###..#.#
+#..#..#..#
+#.#.......
+
+Tile 1327:
+.#..#..#.#
+.###.###..
+..#..#....
+.#...#.#..
+#.##.....#
+#..#.#..#.
+###...#...
+##..#..#.#
+......#...
+#.#...###.
+
+Tile 1163:
+..#.#...#.
+####.#.#..
+.##.....##
+#...#.....
+.....####.
+#...#..###
+...#.##.#.
+##..#..#..
+.....#.#.#
+.###...#.#
+
+Tile 2683:
+.......#..
+.#.#.##..#
+##..#...##
+...#......
+##.##...#.
+...#.#.###
+.#.##.....
+#..#....#.
+.###..#...
+.#.#.....#
+
+Tile 3881:
+#.#.#..##.
+##.#...###
+##......##
+#.........
+#..#......
+...#.#...#
+.#..##....
+.....##.#.
+##...#....
+###.....#.
+
+Tile 2711:
+#...#.#.##
+#..##.....
+...#......
+#.#.#....#
+#...#.#...
+...#......
+.#.#......
+..#....#.#
+#.##..#...
+#.#.#.....
+
+Tile 3491:
+.###..#.##
+.....#....
+.##..#..##
+##.##..#.#
+.###....##
+..##..#..#
+..#......#
+..#..#...#
+#...#.#..#
+.......##.
+
+Tile 2339:
+###.#####.
+.#....#...
+##.#.....#
+#.........
+#.........
+..##..##.#
+.###......
+#...##....
+##........
+#.....#..#
+
+Tile 1543:
+..##...#..
+.....#..##
+....##....
+.........#
+.#..#.#..#
+..........
+.........#
+#.#.#.....
+##.#.#....
+#.#.###..#
+
+Tile 2371:
+#..#.#####
+##.#..###.
+#.#...##..
+#...###.##
+#...#..#.#
+##.....###
+.#.......#
+.....#.#..
+..#.#.####
+.###..##..
+
+Tile 2971:
+..###.#...
+#.........
+##.#...###
+....###...
+###......#
+..###....#
+##.#.....#
+.#.....#..
+#.....####
+..##.##.#.
+
+Tile 2203:
+#.###.#.##
+.#...##.#.
+#.#.....#.
+..#.#....#
+##..#....#
+##..#.....
+#..#..#...
+##........
+..#..#.#..
+##....#..#
+
+Tile 2113:
+###...##.#
+......#...
+.....##.#.
+....####.#
+##..#..#..
+#...#...##
+.......#.#
+......#..#
+#.##.#..##
+....##.#..
+
+Tile 1321:
+.#..#..#..
+##...#...#
+..........
+.####..#.#
+##.#.#.#.#
+#..#.#....
+#..#.....#
+.#.......#
+....###.#.
+##.#.##.##
+
+Tile 1667:
+.#####...#
+##....#..#
+#..#.#....
+..##..#...
+#..##...##
+...#......
+..#..#...#
+.....#...#
+#..#...#.#
+##..#.##..
+
+Tile 3001:
+.#.#######
+...#.#...#
+..##...#.#
+#.........
+....#.....
+#.....##.#
+.....####.
+#.........
+...#.##.##
+##.##..###
+
+Tile 1789:
+..###.#..#
+...##...#.
+........#.
+####...#.#
+#..#..#...
+##.##..##.
+....#.....
+#.#.#.....
+#.#..#...#
+######.#..
+
+Tile 3677:
+.#...#.###
+#..##...##
+#..#...#.#
+##........
+..#....###
+..........
+##..#.##.#
+.#........
+......##..
+.##.##...#
+
+Tile 2693:
+#.#.###.#.
+#.#..#..#.
+.#....#...
+#..#...#.#
+.#.##..##.
+.##......#
+...#.....#
+##...#.###
+.#.#.....#
+########..
+
+Tile 2141:
+#####.....
+#.........
+#...#....#
+....#.....
+.......#..
+##..#.#..#
+#....#..#.
+..#....#..
+.....##.#.
+##..#.#.#.
+
+Tile 3847:
+#...######
+#..#.##..#
+..#...##.#
+##..#.#..#
+##..#..#.#
+##.##....#
+#........#
+#....#.#..
+#.........
+#......#..
+
+Tile 2333:
+#.#..##.#.
+####.....#
+###..#...#
+.........#
+...##.#..#
+###.......
+..##...#.#
+...###...#
+.###.#...#
+##..#.##..
+
+Tile 2129:
+#..###.###
+....#....#
+#.#.#..#.#
+....#....#
+#...#.#..#
+..##.##...
+#.##....#.
+#...#.#...
+.#..##...#
+...###.##.
+
+Tile 1283:
+.#..#.###.
+###.#.##.#
+#..#..#.#.
+.....#...#
+.#.#.#....
+#...#..#.#
+.#.#..#.##
+.#..##..#.
+#....##.#.
+.#..#...#.
+
+Tile 2851:
+.##.#.....
+###......#
+.#........
+....#.#..#
+.#..#..#..
+.##....#..
+.##...#.##
+#.###.##.#
+##........
+.#.#.#.#.#
+
+Tile 2311:
+#..##....#
+.#......#.
+....#...##
+....#...#.
+.#...#...#
+#...#....#
+.....#.#.#
+.....##..#
+##..##.###
+##..###.#.
+
+Tile 3217:
+#.##....##
+#.......#.
+#.#....#.#
+..##.###..
+....##...#
+#.........
+...#.#...#
+..##....##
+..#......#
+##.###..##
+
+Tile 2833:
+####..#..#
+#...##.#.#
+........##
+..##..#...
+.......#..
+......#...
+###..#..#.
+.##..#...#
+##.#....#.
+.####.....
+
+Tile 3593:
+#..#####..
+.##.#....#
+...#..#..#
+##.#...##.
+#######...
+...#..#...
+#.##..#.#.
+#........#
+#...##..##
+........##
+
+Tile 3299:
+...#.#..#.
+#.#......#
+##......##
+.#..#..#..
+#.#####...
+#...#....#
+#.#.......
+..#....#.#
+.#........
+#.#.#.##..
+
+Tile 2719:
+...#..#.#.
+#..#.###..
+......#.##
+....#.#..#
+#.#......#
+....#.....
+##..#.#...
+...##.....
+###.#....#
+..####..##
+
+Tile 2161:
+..#.##..##
+#........#
+...#.#...#
+...###....
+......#..#
+..##.##.#.
+.#....#.##
+#...#####.
+#....#...#
+.#....#...
+
+Tile 3643:
+...#...##.
+##......##
+....#.###.
+.#.#..####
+..#.#...##
+.##.#.#.#.
+#.#..#..#.
+#..#.#..#.
+.#........
+.#.###....
+
+Tile 3767:
+.##.#....#
+#...#...##
+.#...##..#
+.#.#......
+..#..#..##
+#..#.#.##.
+#.....#.##
+....##...#
+.....#.##.
+..#..###..
+
+Tile 2377:
+.#####.#.#
+..#.....##
+#...#...#.
+##....##..
+....#..#..
+#.##..#..#
+.#...#.##.
+...##...#.
+#....#....
+..#.#..###
+
+Tile 2441:
+....#.###.
+.#..#....#
+.#.###....
+#...#.....
+#.#.##....
+....##....
+....##...#
+...#..##..
+#...###.##
+.##.#.#.#.
+
+Tile 2273:
+...#..#.#.
+#..#...###
+..#....#..
+...###.#..
+.........#
+..##.#..##
+###.#....#
+#..#.....#
+....#...#.
+.##..#####
+
+Tile 1231:
+....#####.
+#.....#.#.
+..#....#.#
+.###..##.#
+#..#....##
+#..#.#.#..
+..#.###...
+##........
+..#.....##
+##.##..#.#
+
+Tile 2879:
+#####.###.
+#..#..#..#
+...#..#..#
+#.........
+.#.#.#...#
+...#..#..#
+#.#..#.###
+#.....####
+.......#.#
+..##.#####
+
+Tile 2473:
+.##.###..#
+....##.#.#
+#..#..#..#
+..#.#.#...
+#..##.....
+.##....#..
+....##..##
+...#.....#
+....#.....
+.#####.#..
+
+Tile 3329:
+#.#..###..
+......###.
+.###..##..
+...#.##...
+#..#.#.###
+#.###..##.
+##..##...#
+..#####..#
+.#...#....
+#.##.#..#.
+
+Tile 1489:
+....#....#
+#.##.....#
+..#......#
+..#...#..#
+.#....#..#
+#..##...#.
+..####.##.
+.#..##..##
+..#.....#.
+##.#.##..#
+
+Tile 3259:
+..####.###
+##.##..#.#
+.#..#..###
+#.#.......
+.....#.#..
+##...#.#..
+.....#...#
+.#....#...
+..#.#....#
+######....
+
+Tile 1123:
+....#.#.#.
+...##.....
+...##....#
+#.##....##
+..#...#..#
+.#..#.....
+.#......##
+.........#
+.....#...#
+.##.###...
+
+Tile 1381:
+.###..#.##
+#..##..#..
+#.....#..#
+#..#..#..#
+#....#.#.#
+.......#.#
+#...#.#..#
+##..###..#
+..#..##...
+..##.#..#.
+
+Tile 2903:
+#.###.###.
+#..###..#.
+##.......#
+.#....#...
+#..#..##.#
+...#...#.#
+#.#...##.#
+......#..#
+##.#..#..#
+##.#..##.#
+
+Tile 1049:
+#....#.###
+####.....#
+#.##....#.
+.#....##..
+.##..#..##
+#.#.#..#.#
+.##...#..#
+...#..#.##
+.....#..##
+..#.#.###.
+
+Tile 3137:
+...#.#.#.#
+#.#....#..
+..###...#.
+..#..##..#
+.#.#.##.#.
+#.#..##..#
+#.....#...
+##...##.##
+#.#...#...
+.##.#.....
+
+Tile 2131:
+.#......##
+...#...##.
+.#.#.#.#.#
+..........
+...#....#.
+#.#.#..#.#
+..#.#....#
+....##....
+....##..#.
+##.##..#..
+
+Tile 3733:
+.#.#....##
+.#..#....#
+..###.#..#
+.....#...#
+...#.....#
+###..#....
+#...#.####
+......#...
+..#..#....
+.#####.#..
+
+Tile 1973:
+.#.#.##...
+#.....#..#
+#......#..
+...#...#.#
+..#..#...#
+####.#....
+....#..#.#
+.#.....#.#
+....#..#.#
+..#..#.#..
+
+Tile 3889:
+#.##.#...#
+#....##..#
+.###..#.##
+..#...###.
+#....##...
+#.##......
+#.#..#..#.
+...#.#...#
+........##
+##.#..#.#.
+
+Tile 1129:
+#...######
+#...#.##.#
+###.....#.
+#.#..#..#.
+.#....#...
+..#...#..#
+#....#.###
+......#.#.
+#.#..##.##
+.###..#..#
+
+Tile 1549:
+.#..##.#..
+#.#....###
+...#..#...
+##....#...
+..##...#.#
+#.#....###
+..#.##.##.
+.....#...#
+#.##.....#
+#..#.##...
+
+Tile 2213:
+#...#.#.##
+#........#
+...##...##
+.#..##.#.#
+#..##....#
+...##...##
+##........
+....#....#
+...#.#.#.#
+..#.###..#
+
+Tile 1597:
+..###..#..
+#......#..
+.......#.#
+#.#....###
+#.###..#.#
+##.#.##...
+#.##.#..##
+.#.#..##..
+.##..#...#
+##...#####
+
+Tile 1777:
+#..#....#.
+.........#
+..#.....#.
+..#......#
+.##....#..
+#...#...#.
+.#..#.....
+#.....#..#
+.#..##...#
+#.#...#...
+
+Tile 2503:
+#..###.#..
+.#..##.#..
+....##....
+..#..#....
+#....#.#..
+#.#....#.#
+...#.#....
+..##.#....
+#.#.#....#
+#.######..
+
+Tile 3499:
+.####...##
+.#.##..#..
+#........#
+..#......#
+##..#...#.
+#...##....
+#......#..
+.#.#....##
+...#..#...
+.##.#...#.
+
+Tile 1811:
+#.###...##
+..##...#..
+..#.#..###
+##.#....#.
+.#...#....
+##.......#
+#....#...#
+...##.##..
+...#.....#
+.####..#..
+
+Tile 3793:
+###.####..
+##...###.#
+...#.###..
+#....#....
+.....#....
+...#.....#
+###.####..
+#.##.##.##
+......#...
+#.#.###...
+
+Tile 2341:
+.##..#.###
+.#........
+..####..#.
+.#..####.#
+#....#...#
+......##.#
+#.....#...
+..........
+#..###....
+####.#####
+
+Tile 3613:
+..#.#.#.#.
+#....###..
+#......#..
+#.#...#.##
+#..#.....#
+##.#.#.#..
+...####..#
+##...###.#
+#.#.#....#
+#..####...
+
+Tile 3701:
+..##.####.
+#.##...###
+.###.#....
+#..#.....#
+##........
+###..#.###
+..#...#.#.
+.##...#..#
+##.......#
+###.#...##
+
+Tile 1483:
+#####..##.
+....#..#.#
+...#####.#
+#.##...#..
+........#.
+........##
+##..##.###
+.###....##
+...###..#.
+...#.#..#.
+
+Tile 3571:
+#.#.##.##.
+#......##.
+#...#.#...
+.#.#....#.
+#.#....#..
+#.#...#...
+##.....#.#
+##.#.#...#
+#....#...#
+#.#..#..##
+
+Tile 2521:
+##.##..#.#
+......#..#
+.#.#.#.##.
+#........#
+.#.##....#
+.#....#.#.
+##......#.
+#....#....
+.#..#...#.
+.#..#..###
+
+Tile 3413:
+.##.##..#.
+#...#..#..
+##....#..#
+..........
+#..#...#..
+##..#....#
+....#.#...
+#.....#...
+......#.##
+..##.##.#.
+
+Tile 1933:
+#..#....##
+#...#..###
+.#......##
+......#..#
+..........
+##.##..###
+.......###
+...#...###
+.#....#..#
+#.#..#.#.#
+
+Tile 1021:
+.#..##.#.#
+##....#...
+.#........
+.#.#....##
+.#......##
+##........
+.....#..#.
+#....#.#.#
+#.........
+..#.#.##.#
+
+Tile 3323:
+...###.#..
+.#..####..
+....#.....
+#.....##.#
+###......#
+..########
+.#....##.#
+....##.##.
+#..##....#
+#.##.#..#.
+
+Tile 1607:
+....####..
+##.#...#.#
+.......#.#
+#.........
+..#..####.
+..#..#.##.
+.###.#...#
+##...#....
+#.######..
+##.#.#.###
+
+Tile 1481:
+.###...#..
+.#......##
+.....#...#
+...#...##.
+#.###.##..
+#......###
+#.........
+###...###.
+.#....##..
+#....###.#
+
+Tile 1879:
+###.##....
+#.#.....##
+#.#..#.#.#
+.#...#..##
+......####
+#.###.....
+......###.
+#..#.#..##
+..#......#
+.#..#.....
+
+Tile 2927:
+###..##.#.
+#..#....#.
+##..#.....
+#.#...####
+#.........
+..###...##
+#.####...#
+#.##.##..#
+...#......
+#....#.##.
+
+Tile 1867:
+..#..####.
+##.##..#.#
+.##......#
+###..#....
+..#......#
+#..##..#.#
+#.........
+...#..#..#
+#......#..
+.#....#.#.
+
+Tile 2647:
+#####.##.#
+...#...#..
+#.......##
+...#..#..#
+..#.###...
+...##.....
+..#......#
+.##.......
+#...#.....
+##...##.#.
+
+Tile 2207:
+#.#####.#.
+#..#.#..##
+...##....#
+..#..#.#.#
+#...###..#
+.##.#...##
+#..##..###
+#.........
+###.#..#.#
+.#....##.#
+
+Tile 1223:
+###.....#.
+#.....#.##
+##.##.#...
+#...##...#
+#....#....
+..#.##....
+##....##..
+..#..#....
+.#.##..#..
+###.#.####
+
+Tile 1931:
+##.#...###
+#...##....
+#..#....#.
+..##..#...
+#...#.....
+.........#
+###.##....
+...##.#..#
+.#.#.....#
+..#..##.##
+
+Tile 3917:
+.##.#..#..
+.......##.
+#.##....##
+...#....##
+###....#.#
+.##.#...##
+###.......
+##.....#..
+....###.##
+....#...#.
+
+Tile 1663:
+#.#.....##
+.#.##.#..#
+....#...#.
+#...##...#
+#..#......
+.#..#.#..#
+..#..#..##
+...#......
+#...##....
+.##.######
+
+Tile 3373:
+#..###.###
+##...#.#..
+#..#..#..#
+.#....##.#
+..###..##.
+...#.#...#
+#.....#..#
+##..#.....
+.#..#.#...
+.#...###.#
+
+Tile 1319:
+.#.#.#.#.#
+.....#..##
+..#.#.#.#.
+.#.##...#.
+..##......
+...#......
+.#........
+#..#.....#
+#..##....#
+.#.##.#..#
+
+Tile 2687:
+#...###.#.
+##.#...##.
+#...#...##
+#..##....#
+......#.#.
+.###.#.#..
+##...#..##
+......#..#
+..........
+#.....##.#
+
+Tile 2003:
+.######...
+.##...###.
+....#.....
+#.###.#.#.
+......#..#
+..##.#.#.#
+#.##..#.#.
+####.#....
+#...#.#.##
+......##.#
+
+Tile 1453:
+###.#.####
+...###..#.
+.#..#..###
+..#......#
+#.#..#..##
+..#..#.#..
+#.#...#.#.
+..##..#.#.
+#..###....
+..#..#..##
+
+Tile 1871:
+..#..#####
+##..#....#
+##.......#
+#..#..#..#
+#.....#.#.
+#..###....
+..........
+.#........
+.#.##.##.#
+#.#..#.###
+
+Tile 3709:
+.##.#.##..
+.#..##...#
+.##.......
+..##.#....
+.........#
+....#.....
+###.#.##..
+.#####....
+#####.#...
+..#..#####
\ No newline at end of file
diff --git a/day20/day20Test.txt b/day20/day20Test.txt
new file mode 100644
index 0000000..b3aed46
--- /dev/null
+++ b/day20/day20Test.txt
@@ -0,0 +1,107 @@
+Tile 2311:
+..##.#..#.
+##..#.....
+#...##..#.
+####.#...#
+##.##.###.
+##...#.###
+.#.#.#..##
+..#....#..
+###...#.#.
+..###..###
+
+Tile 1951:
+#.##...##.
+#.####...#
+.....#..##
+#...######
+.##.#....#
+.###.#####
+###.##.##.
+.###....#.
+..#.#..#.#
+#...##.#..
+
+Tile 1171:
+####...##.
+#..##.#..#
+##.#..#.#.
+.###.####.
+..###.####
+.##....##.
+.#...####.
+#.##.####.
+####..#...
+.....##...
+
+Tile 1427:
+###.##.#..
+.#..#.##..
+.#.##.#..#
+#.#.#.##.#
+....#...##
+...##..##.
+...#.#####
+.#.####.#.
+..#..###.#
+..##.#..#.
+
+Tile 1489:
+##.#.#....
+..##...#..
+.##..##...
+..#...#...
+#####...#.
+#..#.#.#.#
+...#.#.#..
+##.#...##.
+..##.##.##
+###.##.#..
+
+Tile 2473:
+#....####.
+#..#.##...
+#.##..#...
+######.#.#
+.#...#.#.#
+.#########
+.###.#..#.
+########.#
+##...##.#.
+..###.#.#.
+
+Tile 2971:
+..#.#....#
+#...###...
+#.#.###...
+##.##..#..
+.#####..##
+.#..####.#
+#..#.#..#.
+..####.###
+..#.#.###.
+...#.#.#.#
+
+Tile 2729:
+...#.#.#.#
+####.#....
+..#.#.....
+....#..#.#
+.##..##.#.
+.#.####...
+####.#.#..
+##.####...
+##..#.##..
+#.##...##.
+
+Tile 3079:
+#.#.#####.
+.#..######
+..#.......
+######....
+####.#..#.
+.#...#.##.
+#.#####.##
+..#.###...
+..#.......
+..#.###...
\ No newline at end of file