Browse Source

initial commit on day 9

Juan José Gutiérrez de Quevedo Pérez 5 months ago
commit
f896e7c753
31 changed files with 8328 additions and 0 deletions
  1. 11 0
      1/1.py
  2. 18 0
      1/2.py
  3. 200 0
      1/input
  4. 16 0
      2/1.py
  5. 17 0
      2/2.py
  6. 1000 0
      2/input
  7. 12 0
      3/1.py
  8. 23 0
      3/2.py
  9. 323 0
      3/input
  10. 23 0
      4/1.py
  11. 54 0
      4/2.py
  12. 1023 0
      4/input
  13. 33 0
      5/1.py
  14. 33 0
      5/2.py
  15. 933 0
      5/input
  16. 13 0
      6/1.py
  17. 19 0
      6/2.py
  18. 15 0
      6/einput
  19. 2172 0
      6/input
  20. 34 0
      7/1.py
  21. 26 0
      7/2.py
  22. 9 0
      7/einput
  23. 594 0
      7/input
  24. 18 0
      8/1.py
  25. 30 0
      8/2.py
  26. 9 0
      8/einput
  27. 623 0
      8/input
  28. 15 0
      9/1.py
  29. 12 0
      9/2.py
  30. 20 0
      9/einput
  31. 1000 0
      9/input

+ 11 - 0
1/1.py

@@ -0,0 +1,11 @@
+import sys
+
+ns = []
+with open("input") as f:
+    for n in f:
+        n=int(n)
+        m = list(filter(lambda x: n + x == 2020, ns))
+        if m:
+            print(m[0]*n)
+            sys.exit(0)
+        ns.append(n)

+ 18 - 0
1/2.py

@@ -0,0 +1,18 @@
+import sys
+
+def find_sum(l, total):
+    for i in l:
+        m = list(filter(lambda x: i + x == total, l))
+        if m:
+            return (i, m[0])
+    return (None, None)
+
+ns = []
+with open("input") as f:
+    for n in f:
+        n=int(n)
+        n1, n2 = find_sum(ns, 2020-n)
+        if n1:
+            print(n1*n2*n)
+            sys.exit(0)
+        ns.append(n)

+ 200 - 0
1/input

@@ -0,0 +1,200 @@
+1440
+1511
+1731
+1400
+1542
+1571
+1768
+1730
+1959
+1342
+1744
+872
+1237
+1846
+1597
+1583
+1711
+1499
+1679
+1895
+1875
+1928
+1728
+1673
+481
+1934
+673
+1704
+1916
+1958
+1821
+1649
+1640
+1802
+1732
+121
+1924
+1438
+1748
+1046
+1905
+1566
+1152
+1964
+1518
+1603
+1414
+1785
+1993
+1594
+1761
+1455
+1738
+1699
+1507
+1483
+1450
+1653
+1644
+19
+1340
+1227
+1353
+2009
+1188
+1228
+1898
+1941
+1515
+1766
+1351
+1980
+1378
+1702
+1620
+1729
+1279
+1384
+1894
+1770
+1853
+1161
+1970
+1986
+1669
+1938
+1602
+1190
+1822
+425
+1750
+1632
+1613
+1805
+1718
+1990
+1762
+1242
+1485
+1598
+1893
+1995
+1823
+1786
+1506
+1464
+1467
+1639
+1674
+1903
+1961
+1478
+1847
+1760
+1997
+2010
+899
+2000
+1488
+1243
+1891
+1504
+1693
+1176
+1391
+1563
+692
+1497
+1428
+1745
+1368
+1723
+1989
+1930
+1171
+1840
+1372
+1987
+1952
+1842
+1967
+1759
+1929
+1945
+1919
+1333
+1692
+1811
+1221
+1520
+1920
+1093
+1618
+1795
+1686
+1369
+1820
+1857
+1356
+1562
+2004
+1519
+1628
+1831
+1687
+1792
+1948
+927
+1789
+1546
+1338
+1614
+1472
+1494
+1979
+1936
+1577
+1147
+1446
+1683
+1375
+856
+1787
+1517
+1724
+1334
+1642
+1496
+1668
+1725
+1800
+1708
+1814
+1585
+1827
+1801
+1208
+1839
+1596
+1925

+ 16 - 0
2/1.py

@@ -0,0 +1,16 @@
+def validate(password, rule, letter):
+    count = password.count(letter[0])
+    mi, ma = rule.split("-")
+    if count >= int(mi) and count <= int(ma):
+        return True
+    else:
+        return False
+
+count = 0
+with open("input") as f:
+    for passline in f:
+        rule, letter, password = passline.split(" ")
+        if validate(password, rule, letter):
+            count = count + 1
+
+print(count)

+ 17 - 0
2/2.py

@@ -0,0 +1,17 @@
+def validate(password, rule, letter):
+    p1, p2 = rule.split("-")
+    p1 = int(p1) - 1
+    p2 = int(p2) - 1
+    if (password[p1] == letter[0]) != (password[p2] == letter[0]):
+        return True
+    else:
+        return False
+
+count = 0
+with open("input") as f:
+    for passline in f:
+        rule, letter, password = passline.split(" ")
+        if validate(password, rule, letter):
+            count = count + 1
+
+print(count)

+ 1000 - 0
2/input

@@ -0,0 +1,1000 @@
+3-11 z: zzzzzdzzzzlzz
+3-7 x: xjxbgpxxgtx
+3-4 v: vvmv
+3-5 t: tgkfq
+9-10 j: jjjjjjjjqjjjj
+5-7 r: rnhrhrr
+2-6 n: gnntnnsnnqjsbrn
+3-4 g: vrggfvxsgmggkgsm
+1-4 c: brccqr
+1-5 h: hhhzzvcdhhhhhhhh
+4-11 c: ncnqbzlkckc
+1-13 q: hqqqqqqqqqqqlq
+8-9 h: hhhhhhxxkh
+3-9 b: bbbbsfbbc
+3-8 k: zfqzkzgk
+3-9 k: wjkwhnkkfvxk
+3-11 v: vgkvvcjvvvv
+5-6 l: llllhr
+9-11 z: lzzzgzzmzzdzzz
+13-16 w: wwlwwwwlwwxwwfwf
+8-11 r: rrrrrrrrrrcrdrr
+1-9 v: mlvvvxnwrwvv
+4-6 z: mzzzzz
+3-4 s: svsj
+8-11 w: wwwwwwwjwwww
+10-13 r: drrrrzhmxfjdrtfgr
+19-20 h: hhhhhhhhhhhhhhhhhhfh
+1-4 z: nzzcz
+10-11 d: ddldddddxdfdd
+10-14 d: dddddcddndkddd
+7-15 h: hhhhhhhhhhhhhhhhh
+1-9 h: rhhhhhhhhh
+3-4 m: mmztmm
+4-6 w: wmwxcwwlwwj
+7-15 g: ggggggggggnggglgg
+9-14 n: ntnnnnqnnnnnng
+2-3 f: fffl
+1-7 b: bjsqsbbzblt
+3-6 c: cckccccc
+4-9 z: hhgtvzszb
+1-7 l: tlllllll
+2-3 v: mknzrq
+12-18 w: wwwwwwwwwnwwwwwwwsww
+5-8 k: kkkgkjkdkrwgk
+10-12 z: gczzgvzzpzwzzzzzf
+11-12 x: xxxxxxxxxnqxxnxx
+4-7 c: chccccgccccscpcc
+7-9 k: kqbkxhkkkkkscfr
+2-4 r: rrrrr
+3-5 p: lwhwp
+11-13 r: pfjmrrdqnbrwrn
+4-8 l: nkpmjlrbtsxdzkqjqj
+1-10 k: kkbdtkkqrkkkkkknklk
+16-17 b: cxtqsbfbtkxqbprzbbgr
+7-9 x: xlgxdxxtqhxkbnxw
+5-6 k: kbkqkqkk
+6-9 s: sbssspssk
+13-17 p: pzrpphmphgpkpbppj
+2-8 r: ttbrrmrfr
+16-17 c: cccccscckccccccvccc
+4-5 v: hvvmv
+4-12 s: swssssssssshjsszrss
+9-10 q: qgqqqjqjkqhqq
+2-4 s: rwtknhj
+3-8 s: rbstpgqdslkvkkzprdzp
+8-9 d: ddsddvdpd
+1-2 r: rkrrrrrtrrdnrr
+7-8 v: vfpfrmltllx
+2-3 k: knkrk
+4-5 f: pwrbffffc
+7-9 n: nnntnnnpnbjjn
+6-13 r: rrrrrrrrrrrrrr
+5-8 g: bfgzlbmgjn
+3-4 q: tqhq
+13-16 m: mmmmkmmmmmmmmmmmmmm
+1-5 w: wwwwhhwgwfgfkvwqbx
+4-7 n: nbjnnnqnbpc
+12-14 g: ggggggggghgbgk
+14-15 b: bdbbbxbdbzjtbcs
+8-9 z: zdfzxzkpz
+19-20 r: xbpdfrkmtgzrrqrrjrrr
+9-12 f: ffffffqfpgvzgfnf
+11-12 m: mmmmmmtmmmmm
+6-7 q: lbqqqqtb
+6-10 g: gggggtgggmgggg
+9-16 p: prppzppdppppkpjfpc
+1-3 x: xkrbrxdvrncxd
+17-18 b: bvpbnbrgvjcbbkjrbj
+13-18 d: dddmddddjdtdddddddd
+3-4 z: zzdzc
+8-9 m: mmmmmmmpm
+4-10 v: rvzqvrvvgvqvv
+1-9 q: jnhbqjlvq
+5-13 d: sddkhdjddkddpkvdsw
+5-9 d: dppdpddtmvl
+5-7 s: knzhssbxsjcssnsqb
+10-15 p: ppgvpppvplpppxpcp
+5-6 c: cczccv
+5-6 q: dqlvjfqqqqmqxq
+8-10 j: jjjjjwjxgknjfjj
+7-16 x: xxxxxxxxxxxxxxxcx
+9-13 h: hhhhzvwhhbhhhhljhh
+6-7 v: wvzxlvt
+16-18 f: fsffbffffpffffflfff
+1-5 r: rhrvrprwwb
+5-8 h: hhhhhhhjh
+3-6 p: ppgppsp
+15-17 r: rrrrrrrcrrrrlrrrb
+3-6 m: jhzmtmbnwh
+6-9 r: rhfjdrrhrg
+15-17 l: gqngllrsxrlpxblfl
+2-12 w: wwwwwwwwwwwww
+2-3 c: cpncdqzp
+3-4 f: ffllffqjf
+1-9 c: ccccccccbcc
+19-20 x: xxxxxxxwxxxxxxxxxxvx
+3-4 p: pplvs
+2-3 s: ftss
+11-12 s: ssdsssgsssths
+4-11 m: mmgmpmsqrmmmbwmm
+2-4 x: xhrk
+6-8 g: gggvgggv
+8-14 h: whhhlhhdhhhlhhh
+5-16 g: fnxpglggbrsgscqmzlfq
+5-11 h: hnhhhhhhhhthmh
+5-7 x: xvxxxxxqxw
+1-3 m: mnbt
+1-6 g: bgggbwghg
+1-6 f: sptjzfxcfw
+9-12 g: ggzgggggvgtjgg
+2-4 q: qlrvx
+4-5 j: jjjgj
+1-3 g: htmg
+6-8 j: jjjjjmjjjjjj
+12-14 h: xhhhhhhhhhhlhhfhh
+9-11 h: hkvhhgvhhhrshml
+12-13 j: jjjljjtjpjjjgj
+6-7 r: drqdrrvr
+6-17 q: qqqlqqqqqqqqqqqqbqqq
+6-7 j: vjjrvjjjwzj
+11-12 v: vtvvvjvvvvgvv
+6-8 x: xxxbcbxl
+3-9 f: fffffffff
+9-10 c: cccsccllrktqccfjzz
+2-5 s: ssssqn
+8-15 x: brlmqdmpfdqgmgptgxd
+1-4 t: ttlcttw
+5-6 c: cqccnc
+10-11 m: mqmmmmmmhvvlrmm
+3-4 j: jjhjwbjj
+10-11 c: ccccccccckd
+6-8 h: xhhchhfchh
+9-10 n: rnnnnnnncnnnn
+1-4 l: lvslw
+3-4 s: spfs
+11-13 n: fqtdnnnnnlnnx
+6-7 g: xdgxggp
+7-8 r: xhrnqlrr
+1-12 r: rrrrnwwrbrbrhrjxr
+14-15 b: chmbmkxngftlfbf
+1-3 m: fmmgmdgs
+5-7 w: fwwwswwwwwgw
+10-14 l: qlllgzljczmpls
+1-2 k: kkkq
+5-6 t: tttttt
+9-16 r: gpdtlxhntjfjjtlsxd
+4-5 g: kgjrhjmszxg
+4-5 z: zmszpklzsvz
+1-2 j: mfjjb
+3-6 s: sfxlzslsrszcsstsrb
+3-4 n: knlvnnkq
+1-2 s: jsst
+3-4 n: nsnm
+1-2 m: wzgczk
+10-11 b: btnnwgbgtht
+2-7 d: qcrdlgdgc
+10-13 w: wxwwdrwwwtdwwwswh
+2-3 c: cckcd
+3-6 p: ppqppppp
+1-6 n: nmsnjdn
+2-3 h: hhrhj
+11-12 w: wwwwwwwwwbvwwwwwh
+1-14 c: zkctkncccccfcccpccc
+6-7 m: zqvdkmnztcvmdrgbw
+1-13 q: qgmqhfgphjzrt
+6-7 l: llllljdv
+2-5 k: jspjkkkk
+7-15 p: ppppppvppppppppppp
+12-16 k: klkkkkkvkkzxkkkg
+8-17 x: xrxxnxxxsxvvxwbwzl
+11-14 s: ssssssssssssst
+8-15 z: cfznhznzwnzzrmm
+5-7 q: rqpnqwqvw
+2-9 c: zrpcmsclcbxtkbjvjc
+5-12 c: ccccpccccccjcccc
+3-8 w: hwswwrwwww
+4-9 p: wphzppzxpkxpbpzsplp
+4-5 q: rqqcqw
+11-14 k: kkckkkkwkkkkkdkk
+2-5 v: sqvvpvxvqgvvvzr
+5-10 f: ffffzffffjff
+4-6 b: bhbbjk
+4-8 z: zxzzzdzrzz
+4-8 h: hhhhfscrnhthppkkvh
+2-3 w: wgvwwjwwww
+3-5 d: dsdjddnndzbxtd
+5-13 m: mmmmfmmqmmmmmmm
+1-2 l: wglcs
+8-9 r: rrrrrrrsr
+8-16 l: lllllllllllllllll
+8-10 s: fmqsscwtshsss
+2-13 q: qqqzqqnxvqqsqjzl
+5-7 f: vrwrfffcmjwsfdzffm
+2-8 k: hhsbmrkkfhkkxkkz
+12-13 f: ffffffcffffff
+4-5 x: pzrxwxbxxdgfnxg
+1-5 c: cccww
+8-11 g: dgggjrggggggg
+9-14 t: httdgxxtthtsxtpsml
+7-11 p: pprppppppppp
+13-16 m: mmtkphqvkrzpwzsm
+12-15 g: gkzgggggggggggltb
+5-7 k: kkkkvkjkkk
+15-17 p: pppptpppppcjppppsp
+1-5 z: znzzz
+2-14 j: lnjjjghjjrjjjj
+3-9 r: rrvrrcrrr
+2-4 m: wggmmh
+4-5 b: bbbbrb
+2-16 v: vgvvvvvvvvvvvvvvv
+2-15 s: rsswfmvsrdkjqjssl
+3-6 b: nbbbnbbbb
+2-4 x: pxxwj
+12-13 c: cccccccccccccc
+6-8 g: gggggpgvggg
+3-6 j: srljvjqpkjvtdrndkgjr
+7-8 g: gmggtcggz
+3-7 p: tmvpppkm
+4-10 w: qrwgmwdwlww
+6-8 k: kknckkkjkkk
+11-14 g: ggggggggzggggcgggggg
+11-14 j: jjjwjjjjtmjjjgjj
+7-12 n: njmntnnsbncknqnn
+5-8 t: tbrttttctrt
+4-6 f: gffrffzffffffm
+4-11 c: pksccvlcsrcjgmzn
+2-3 p: vbcfdppzw
+2-5 c: lqfcc
+1-2 h: lhskgvhc
+10-11 b: bbbbbwbbbmc
+3-15 n: nkbtnlznnxffzjlpfm
+2-5 s: ntsqc
+9-11 l: llllllllblfl
+9-10 d: ddcdfdbcqn
+8-10 g: htgcjhggzmnl
+5-10 v: vvqvvvvvvbvv
+2-6 l: lllfjdc
+3-4 c: gxtmsqdsps
+7-8 f: fffffbbm
+1-6 z: zlndzbf
+9-11 g: ggzgxgggkgggzd
+15-16 n: fflrvmnrvjnrznqgq
+1-3 b: lkbb
+2-3 k: kgkk
+9-12 r: skrrrrrjrmrhr
+10-15 c: ncccmccpvcqfcqgcfcj
+5-13 r: rrrrrrrrrrrrrrrr
+13-14 b: bbbbbbbbbbbbfb
+13-18 l: llvllllllpllllllbl
+4-5 m: mmmmqm
+5-9 g: ggrgcgggggggg
+1-4 q: qqqq
+1-13 l: llllllllllllll
+14-18 g: ggggdgpgggjfgmngggg
+13-16 p: pppphppppppppppv
+1-7 f: ftffffgffff
+8-9 s: tbslsssjsqsssss
+8-9 s: szmzsssss
+7-8 l: lllllllll
+4-6 t: twtjrt
+3-11 z: zjzntzxzlzczdtz
+4-8 c: ccchcclc
+3-11 l: wvldjftflsgzcwllbbm
+1-7 x: xwjhmgxkqqtdx
+8-12 c: cccccccnccckcc
+2-8 f: nghfxvqtfrpwjf
+6-7 b: nbbbrbslsb
+3-4 w: zwnwdzqw
+7-8 p: tpppppnpppppp
+8-9 q: qwqqqjbft
+3-4 z: zztzn
+13-14 f: dfffffmxffffff
+3-14 t: gnpksvbtpzxrsw
+12-16 z: zzzzzzzzzzzfzzzz
+2-4 b: mzbxbk
+5-6 r: rrrrpr
+5-10 z: cfflzmzxdc
+4-5 l: lvtvblll
+6-19 t: tttttdtttttttttttttt
+7-8 g: gjgbtggjggg
+3-5 s: sssssr
+8-9 s: kssvfsssrsrssns
+2-4 p: gpbm
+1-2 g: gbjsl
+3-4 k: tdkn
+8-9 z: zzbglvpbrfml
+5-13 m: mmmmlmkmsmxzmpmmcmm
+16-18 b: lbbwbbbbbbbbbbbbsb
+2-4 s: fgsstnssztbzkzcmp
+3-9 l: hvllztddtj
+4-8 w: wwzcwwwf
+11-12 z: zzzzzzzzzzck
+9-10 q: qmqqqqqqqw
+1-8 x: qpxxxxxrxxxcxvxt
+12-16 l: lllllllllllsllllllll
+4-5 r: rrrbt
+4-6 v: mjvwvvv
+5-7 r: rhrrrrrrr
+1-2 v: vgfvv
+4-15 b: bbblblbvbbbbslbbbcq
+14-15 c: cclcccccccccccc
+8-20 h: gzkhwrhrjdphrrhnjhcm
+5-10 m: mmmmtmkmmmmpmmhm
+2-14 f: kjcwnfhcqnwhbgm
+11-13 m: mzmvmmsmlmmppm
+3-9 g: kglkgdctgxxs
+2-7 s: ssdglzsb
+7-10 j: jtjjjjjjkj
+12-13 q: hxhjqsqsqzqqmjnqks
+18-19 f: ffffffffffffffffffxf
+3-11 v: xhvtvnjcccnsvgzv
+8-9 j: jjjjxjjjrw
+4-8 c: bvxgnmvczbsjvtc
+11-18 g: gggggggggzzgggggggp
+8-13 p: pppppwpdppppppp
+14-15 t: tttttgttttttttj
+14-17 h: hhhdnhhhhhhhhbhhg
+3-5 m: mmmmm
+1-8 n: znnnnnnhn
+2-5 l: qwvchzxlrlrlpldl
+17-18 j: jjjjjjjjjjjjjjjjjmj
+7-18 s: sksssssssstsssshsg
+4-5 k: kbqks
+6-8 q: qqqqklcjm
+8-17 x: tjdsxwtxwxcjtzxfxgkt
+5-8 w: qwxwvwcwvzlvrwwww
+16-18 f: fffffffffffffftfffff
+3-12 z: zzzzzzzzzzzfzzzz
+10-13 m: mmmmqmmmvmmmx
+4-7 z: zkjzvpf
+11-13 p: pzqpppppppgpt
+11-12 c: cccccwfccccccz
+3-4 s: ssxsss
+8-9 j: bsjjjjjpxjjjj
+2-7 x: cxkbqkf
+7-18 x: vmrsdvxxpbjrxbnxqxxg
+8-11 d: nwzdcqvddfd
+7-11 h: hhhhhhlhbhhh
+9-10 f: fhlmjqfzfq
+13-15 p: jcfprqlvrnfnfnp
+2-3 b: gblb
+5-7 s: jssssqz
+1-18 c: ccccccccccccccccczc
+10-15 x: xxxxxxxxxwxxxxxg
+6-7 w: jswwwwdcw
+4-10 q: bqtxmcgxnjnkvq
+1-2 c: ccccc
+10-12 h: hhhlhhhhjkhsh
+3-4 w: hwgwxd
+17-19 j: jjjjjjjjjjjjjjjjdjpj
+1-4 d: dddt
+7-8 z: zzzzzzlhz
+13-16 z: zzzzzdzzzzzzzzzpzzz
+4-10 d: dgdzdddddddd
+4-7 l: llclxltlpqh
+1-4 x: hxxxx
+5-7 n: vnnnnnndxn
+10-11 n: nnnnnnnnngg
+5-12 k: bkcdkpjrpkkv
+6-8 j: lsjhjjqjcx
+7-10 t: ttttfttttt
+17-19 n: nnwnnnnnnnnnnnjndznf
+1-4 v: vvvv
+14-18 x: xxxxxxxxxxxxxnxxxx
+3-5 x: kxjjx
+3-8 k: kkrkkkkskkkkkkk
+8-11 h: hhhhhhhhhhlhhnjh
+4-5 x: nxxxnz
+7-10 z: zzzzzzzbzq
+7-13 b: dvbsbbbbbbbkcbb
+3-5 k: drkrkpnhkpjhkk
+8-9 w: wrwwwwwwf
+3-4 x: kxxtwx
+5-17 n: nnbnnnlnnnnnnqnnn
+11-14 k: kkkkqkkbkklkkkkkkkkk
+4-7 q: qqjjqqqqqqq
+3-4 k: gkkkxlx
+11-17 s: ssssqssssjrsmgssstgs
+6-17 n: dntjvnhjgrbtcnnmkdc
+1-5 l: hrqqlqpdlmbjlllmfjqz
+1-5 k: kkkvk
+9-15 z: zmzzzjzxmzzzbzv
+1-2 s: rsssxzss
+1-4 f: fdfc
+1-7 t: ntttttttttt
+10-12 t: mtttzttwtttkstjtztt
+9-15 q: qlqqqbqqqqqqqqq
+4-5 f: jwfff
+5-6 p: ppwppvppp
+12-14 p: ppppppppppplppp
+2-8 x: wxbngjrxzx
+1-2 h: hlhlg
+9-10 b: bbbbbdbbbqb
+6-15 w: wwwwwwwcwwwwwwww
+2-7 d: sgcfddnqmjthdphl
+7-9 m: zqrwxkmjr
+5-7 f: qklfrzfgffff
+14-15 n: lnnnnnnnnnnnnnnn
+2-11 q: gqqlcqjlqrsbqkqqq
+7-8 x: xxxxxnlx
+2-9 v: xvvqbvfkwd
+10-12 z: rmvxznxnszkzdb
+2-3 q: qkqq
+2-6 n: nnqqgv
+4-6 d: dddddc
+8-9 z: zzzzwzjzz
+1-14 q: wxqnqqqqqqtqqq
+1-5 g: grgtggnh
+4-6 x: mbtxxxxxxtm
+3-7 w: wwtwwww
+4-6 h: phchhbxf
+4-6 n: npznhtxf
+14-20 v: vkpjvvbrvvvfvzvvvcxv
+17-18 m: rmccmmmmvmkmnmqtmz
+4-9 n: nnsnxnfbjnjnnnkn
+8-10 c: ccqclccvcccc
+1-12 b: blbhbbbbbbbbbbgbbbb
+4-8 v: vvvbvvvgv
+4-6 m: mdnmmmgrsqjjbctjvhm
+6-9 r: rlrrgrrrhr
+4-6 q: qqqjnq
+8-9 g: spqxllrngwkjgpzpg
+6-9 m: zbsggmvzsmpcm
+3-9 s: xssmzstbsrfz
+4-11 c: cxcrrccccrcncc
+3-4 p: ppqb
+5-8 f: vcfflfflmf
+9-13 b: bbbpwbjbkbhbbktz
+4-9 p: ppppppmpps
+7-17 s: ssssksrvssnsbsssrxsm
+10-12 m: mmmmmmmmmmmsmgmm
+6-13 x: xwxxxxxxxxxxm
+9-10 t: rrthttjtttwlvpttgttt
+6-10 z: vzklxxzvwgzt
+2-4 v: vvvk
+5-8 h: twhghhhw
+7-8 n: nnwnnknrn
+2-4 m: mmmmm
+3-7 r: srxrrmrwrrhrg
+5-6 x: xxxxxh
+5-6 x: xxxxxtx
+5-13 d: ddddddddddddndddd
+15-16 c: drfrpmbhcncvmxnk
+14-15 r: rrrrrrrrrrrrrrk
+4-6 z: qmlsgz
+9-10 x: xxxpnxrxxl
+3-6 h: hhhhwfhh
+3-8 b: jvpscbzbvb
+9-12 j: jjjjjjjjfjjj
+1-2 n: hwnn
+3-9 l: lpgmzxcwlpsp
+2-7 k: zkbnlwlpk
+2-12 t: tttttttttttttt
+5-14 h: rhjchxhlfjhxfhhb
+1-4 p: pbstdbpctfdzxzh
+9-14 k: swkkkkckqkkrqlkkrtk
+5-6 v: vcvkxvfvrmvvv
+14-17 n: nnnnnnnnnnnnnnnns
+9-13 d: dbdjdhdhrddgmk
+5-6 c: cvzcclcccdf
+16-18 x: xxxxxxxxxxxxxxxxxxx
+15-16 v: vvvvvvvvvvvvvvfv
+3-6 g: jggwkcdpmmttl
+18-19 g: gggslcgggtggggggxgxd
+7-10 r: rrrvrrjrrrrrr
+7-8 f: xzmwmgfkh
+2-4 g: gcgvg
+5-7 k: qkknzkfncgkckkj
+8-10 q: qxgvffbqgq
+5-7 d: slfqbddnrvj
+8-11 k: xtfkkwnccck
+3-4 s: jsrs
+3-6 m: mmdmkmwmmmnd
+6-7 q: gxbthqc
+6-7 v: vvvvvqv
+7-14 n: nxnqnnqnqnnnnnn
+8-12 d: chkdcslxddddd
+8-11 g: cgwlgszgfnk
+12-13 b: bbbbbbbbbbbjc
+7-9 w: wwwwtwwqdw
+14-15 q: qqqqqqqqqqqqqlq
+8-11 q: rhmqdzslbgqwq
+4-5 k: khkxrqxwb
+2-6 l: lskblllkqxdllmhl
+2-9 s: xwxncpjgch
+8-14 x: vxxxxxxhcxxxdxxm
+3-11 g: gggwgggggggggg
+9-11 b: fbbfdmbbbbjbstbb
+5-13 z: zzzzxnzzzzzzzgz
+1-10 b: bnsbgsnrbb
+3-6 w: zxtfmwndwnwkj
+2-4 s: smss
+4-5 q: qjqqz
+12-15 b: kbbbbbbbxbbhbbj
+3-4 d: dhkd
+5-6 k: pkbkkp
+2-4 p: wppkz
+2-6 d: dnddgd
+7-10 j: jdwrhhjszjbkmfphj
+1-3 b: vkcbb
+7-8 f: ffffffdf
+11-13 t: ttttttttttttl
+14-18 x: xvxxfxxxxrxxxgxxxrx
+8-10 k: gtkbkksnkskkrkkk
+2-4 h: hnhh
+10-13 m: vmmwpmlmnckmcmm
+1-2 z: zzzsz
+4-5 p: pppbf
+2-4 q: pwdbsxlrqmhhtccl
+9-11 f: fffhffffvffvfq
+8-9 x: xxrxxxxsx
+8-14 z: zzzzzzzzzzmzzzz
+9-11 j: jjjjqjjpjjwj
+3-4 s: sskss
+8-12 s: tlcssmclnvgstg
+11-12 v: vvdnvmvsvvkx
+4-5 c: ccccbcc
+1-2 d: ddthwdk
+10-13 n: nnnnfnnnnpncnm
+7-8 z: zzzzvzbz
+2-3 n: nnsqnrnnnnnltn
+4-5 q: qqqmq
+6-9 s: ssnsssssksc
+9-11 r: rrrfrrrrhrrr
+3-4 d: tzdd
+3-6 c: cccccmcc
+7-8 q: qqqqtmsqqqqq
+17-18 z: zwkzbhqnhznzlkqxnz
+4-7 m: hfvdmmnszdmb
+14-17 z: zzzzzzzzzzzzzzzzjzz
+12-14 k: kkkkqkfkkkkjkz
+1-3 z: zzdzh
+2-7 v: vvvvnvr
+14-16 j: jjjjjjmjnjxjjtjjjwj
+15-18 h: hhhhwhhqhhtfhhhhhzhh
+1-2 z: dzznmxzt
+5-6 c: cccpkc
+6-10 z: trwqgzmwtvbgnvjkxz
+3-4 w: twwjwg
+6-10 w: nwwcxwjschxpjkrqwvw
+9-10 z: kzzfzzzzzhlzzg
+6-7 r: rrzhqnnrrrhk
+9-11 k: kkklkzkgkrkj
+11-16 d: ddddddsrdddpbdldrb
+6-9 v: njfrfxbqvv
+3-4 j: jjjd
+3-4 q: qgqq
+4-15 h: hhhtthhhhhhhhhhhh
+3-11 b: bbbcnzglwcbqxgwvbc
+2-3 b: nbhbrkkzbs
+4-5 p: ppppk
+2-5 q: jqkzqrzqbtkcqgb
+6-7 s: sssssqm
+1-5 r: rrrrr
+3-4 w: wwwgt
+2-8 x: xxxxxxqx
+9-10 c: ccfccccwcc
+2-10 r: crmkxbcrrkr
+7-16 c: cmmfkhclcwqjcqsmccn
+7-14 p: ppgppppppppppqppppp
+1-3 s: sshs
+1-3 d: lfdd
+5-14 n: fkxsnvxclfnklbqrknvd
+15-17 j: jwjjjjjjjzjjjjjjpj
+4-7 l: lllljnlt
+5-8 c: pczkvcsqpfzcw
+3-14 q: xkqqsvcqdqqqjscfd
+7-11 m: rmhmmmmmmmjmm
+10-13 x: xxxxxxxxxhxxxxx
+1-4 m: mmmmm
+1-4 r: dmrrl
+10-11 s: sssssslssgg
+9-10 g: rtksgmrpbl
+4-10 t: wtfttttttbmntsth
+8-18 k: vwstrvjbjttzbrtghwk
+9-11 s: ssdslssssss
+10-13 s: pssssssfcnjcs
+2-17 l: wpltglllsslllwlslrpc
+13-15 g: gglggglgggvgwgzgggg
+4-6 v: qqvvvvvlbzdv
+4-5 j: jjqdvt
+2-9 n: nnnnfvxnpvfjnnbg
+2-9 c: pgctwtlccvl
+4-6 n: nnnqncnnn
+2-5 l: lzllllnll
+6-10 k: zjkkvkkzwkk
+3-4 h: hhhkh
+3-15 k: kkkgkkkxkkknkkv
+4-7 k: skkknxdf
+4-8 h: hhhhzhkdj
+9-11 j: jjjjjjjjjjsk
+3-6 s: qswngs
+3-7 v: vvcvvvvvv
+11-12 s: ggcxrkcsntpsf
+3-4 v: hvvv
+15-16 t: tttfttftttfttttkttt
+8-13 b: bbbbbbqgbrbcbqbb
+9-12 s: cstnslsssjsv
+3-13 j: kwkjmmqtpcjcjhdllwjj
+2-6 r: rrrrrn
+10-11 s: bsssssstsssss
+1-6 f: cgggvn
+3-10 l: hblknspmlx
+2-3 h: hthhhs
+3-5 n: nnbwn
+1-3 z: nzgzzz
+16-19 p: pppppppppqppppppppqp
+5-11 d: ddddntddgdd
+6-7 s: ssssswk
+1-7 r: lrrkrqrwbkk
+2-9 z: cwzthgjzzgzzhzz
+3-4 c: cxxt
+5-13 c: jczpcmcccccccjpc
+7-8 l: llllllgf
+3-11 q: rqkxqckgqqqqb
+2-14 r: mhlbmsrsgrwrtrbrpt
+2-10 v: tvnxllwvhdkcjsvxlztx
+2-3 q: nwqqwfqlq
+16-18 k: bdkkktkkkkkkkkkqjq
+8-17 k: pkjckwmzqkkvqqshks
+6-7 f: fffffbff
+3-7 p: pppphpp
+6-8 w: wrwcwwjswnwwwp
+3-4 h: hhfh
+2-5 h: hhhrsc
+3-19 b: txxmgxhnbqhtjhjfvdbb
+14-20 w: wwwwwwpwqnwwkwwwwwwn
+5-6 z: zzzzvz
+2-5 x: rxxllbfhnvxx
+15-17 f: fwtfjjfffwfffffph
+1-6 m: msmmmwmsmmmm
+6-11 f: mdtdmfhpscfmrm
+1-16 l: zmlxxnlzzbhfscll
+14-15 x: xxxxxxsxxxxxxxt
+7-10 q: qqqbpqqqhdq
+5-8 v: vvbrtvwvvvlvvsv
+6-7 x: xwfzsjxxxxzpxvsx
+7-10 l: lllllldmll
+10-11 c: cctccccccdw
+3-6 g: ggppjgg
+16-18 c: cfcmcczcvwccccgccccc
+7-9 v: vxdvzvvvchbvvvq
+11-18 t: btnttrttqbtgtxttstrc
+8-10 p: hppppbptppsp
+9-10 g: gtsgglgggtgg
+13-20 f: ffpsfffffffffffffffg
+12-19 m: rmpmmdvzmtmmbfmtxwm
+1-7 g: xgggggxgg
+1-8 w: wsnkwcww
+2-3 z: zmzgxp
+9-11 w: wwwnwwwwwkww
+5-6 w: wwwwrw
+4-5 s: prxsnscsm
+5-6 n: nnnndn
+6-14 g: gfqgggwggjlswdg
+1-3 t: tvtqmtth
+9-10 v: vvvvvvvvvtvvv
+3-4 d: dbvfdw
+10-11 x: nxhxxnxxxvx
+19-20 c: rcchbchcsjghmnjbgpcc
+7-8 n: mxtnnkxcnhnnjknptn
+3-8 k: knjxpwkkzkmzkwfknvzg
+9-10 z: zzzzlznzztzzz
+1-2 k: pxkk
+2-3 k: spkgwkpmns
+12-13 k: kkhkkkkvkkkkzk
+10-13 g: zgwsbgkgjgdgtsm
+4-6 k: kkkwkk
+3-12 w: gbxksbkdvjpwrjplhwvf
+1-6 t: gtttsckj
+14-15 w: wwwwwwwwwwwwwzl
+2-5 b: zbblgb
+11-12 m: mtmmmmmmmmsvb
+10-11 t: tttntttttmtttt
+6-7 v: vvvvvvqv
+8-16 b: bbbbgbbrxbbbbrlgb
+3-5 f: fvfpfghnvkdtpfjrf
+10-13 t: rtttjtsfttttntwt
+10-12 c: ccvcccrczcccqccnj
+6-13 f: fffffkfffffffff
+9-17 k: kkkkkkkklkkkkkkkr
+6-9 k: kkkkkkkkvkkkkkkkm
+7-8 g: gnggmggmgg
+7-8 l: plllgllsll
+6-12 s: sssksjxssssssfw
+7-8 d: fdddqddjddfdpmdlf
+6-11 g: gqggrggvgbgg
+2-3 s: sstsqssssv
+15-16 b: sbfbbbbbbbbnbbrmbbb
+13-14 z: tbptvnfzxwlkgz
+3-5 r: rddtrrdrt
+10-15 p: pspppfppwppppwpp
+2-4 j: bsjjjgkvtw
+3-5 m: pmmmh
+6-7 k: nkdkhwsq
+3-13 r: rfrrfrrrrrrzr
+17-19 r: rrrrrrrrrrrrrdhrrrfr
+8-10 n: nnnnnbnxhnn
+5-6 k: kkkwdwkd
+14-15 s: sdsgspstttvfsks
+1-7 t: tttttttt
+6-7 r: cgrrmrrrrgrbcnhfmvn
+5-18 v: vkxvvsvwhvvvrvvvmrr
+3-4 m: xsmkm
+10-12 q: qqqqqqqqqqqcqqq
+1-6 h: jwhhchh
+6-10 g: ggggmdgtgg
+5-6 v: jsxvwvvsvcrzlnvqwmvq
+2-6 k: kkkkkck
+3-6 w: nckwlw
+4-17 k: wqjnlsmcskndlwpxb
+5-7 f: qrrlbfrrx
+4-9 z: czcrzzzgl
+2-3 t: wttt
+1-8 b: vxbwwxrbbqsjb
+11-12 g: dxgggvbwhnrcg
+3-6 j: jjjjjjjj
+1-10 v: vvvgvvrvvjvvdvv
+2-13 k: jkgfcnqkhdkdjk
+5-7 q: kqqqhrqq
+1-4 p: npqpqpmh
+6-7 x: hmxrnxh
+4-15 n: npncnnnznnkqdnqnn
+2-3 d: dhzdd
+6-10 n: nnnnntnnnnnnn
+4-9 l: lllclllhll
+14-16 n: nnnnnnnnnnnnnvnnn
+6-13 d: sckddddfxdddvdddd
+1-5 f: hfffff
+7-14 f: fffnnfpfffjgqqdf
+9-13 s: msssrsssnsssssss
+5-8 j: bjvdgjkj
+3-5 q: msqqnnb
+11-14 t: ttqtttttttttttttthtt
+13-14 x: xrxxxvxxxxxxxxxxxbbx
+19-20 h: hhhhhhhhhhhhhhhhhhht
+2-4 q: wrlqgqlh
+9-14 z: zznzzzzcmvthzd
+2-6 m: qtlznmbbsznljmhd
+3-5 m: mmmmcl
+2-6 s: ssnbgssnsskhssnrz
+4-5 r: rrrlr
+1-4 b: gbbb
+12-13 v: xvvvvvvvvvvkmv
+7-15 b: bbbbblgbbbbbbbbbbbbb
+3-4 n: ngpv
+3-12 b: bbbbbbbbbbbhrbbbbbbb
+19-20 s: sssssssssssssssssssf
+6-12 c: jcccbckcqxcss
+2-10 r: frsbkmqqpsqdpzrvpr
+3-12 p: ppmkphqgdfphhcpd
+2-4 n: ncnn
+7-14 j: rjjjjjjjjmjjjhjjj
+6-13 p: pppfvppppppppp
+7-8 h: xhbshhhtmxvh
+6-9 f: fffffrfffffffff
+1-6 d: dddddkddd
+3-14 p: pprppppppppppppppp
+5-6 s: sssssvs
+4-13 z: zzzgzzzzjzzzzx
+14-16 f: fffffffvfffffnfff
+4-7 h: xhskgbhbbbq
+5-7 f: fvffffj
+8-9 g: hxfgghdgg
+15-17 w: pxwzjdwcwwmmwnwxz
+2-6 q: pmqqqqqq
+11-17 d: cndddtdnvlnkkrfzdcz
+7-8 w: swwwwwgww
+19-20 c: ckhccpjcjcxcsccvdngh
+5-10 d: ddddddddddd
+4-5 r: rrrrrr
+2-4 c: gcccql
+5-6 t: qbmqfxcsr
+2-6 f: qpfffzff
+3-5 p: lpbwph
+3-6 t: ttrtttt
+2-5 s: wslkz
+3-4 x: cgxt
+6-20 z: hdxggqznjfwjnlvmwsmz
+1-4 l: tkzlgkl
+5-18 s: ssssrssssssssssssss
+8-13 p: wpkpcpppgwplpppp
+6-7 g: ggzxpvpdfggjrgkqdjb
+3-9 b: pqfnczzfb
+11-12 l: llllllllllxl
+17-18 m: gzjvfgvcdxmxxftlzmb
+9-12 v: wvbvvfvrvvxzvsqvfwrv
+13-14 j: jrjjjjjjjjjjjs
+2-20 r: vrvcqskfwkqrdhvtlshr
+1-3 v: wvvvr
+2-3 s: tqlhxbs
+2-19 j: jjjjjjjjjjjjjjjjjjbj
+2-8 h: zphrlkvhczdgrhrm
+9-14 d: ddddbdddddddxfdd
+3-4 c: cctc
+5-6 x: xxxxxvjx
+10-11 s: mvsxzpmssqx
+1-18 m: wmmmmmmmmmmmmmmmmmm
+2-8 f: vffkrwff
+11-14 k: lgknbvvkkfkcqq
+2-4 n: wcnnv
+4-6 w: wwbwnwwb
+2-5 d: jlddr
+2-7 h: hhqhfhvghzgtbfjhhshn
+2-4 j: fjjjbj
+1-10 w: wwwlwbwwsswdww
+9-10 m: mmmmmmtmmmcmc
+13-18 l: lbtllllllzllllllbdl
+5-6 k: bkckkkkkkkckkkkzb
+14-17 v: vvvvvvvvvvvvvvvvvvvv
+9-13 d: dmdpddddqtddddddvd
+10-12 k: kkkgkrkrkkktxkk
+7-8 w: hvwtwwwwwww
+6-13 d: fdpgbqbpmdmkdxkbl
+2-3 m: ctmmlm
+2-5 j: lcjjj
+8-13 w: wwwwwwwwwwwnwws
+12-13 l: lwlmlrlllcpkz
+2-4 g: xgtgg
+5-6 c: cccccrc
+3-10 f: mffnffvjxtfdjd
+1-9 k: nkkdkkkkkkk
+7-13 t: wpmtclstqwtpctgcql
+3-4 r: rfrr
+6-10 b: vkbbbwzbwbbjnsrwb
+4-7 s: qxlmqssqcbhstknvjzss
+3-4 m: mmfmnmmxvm
+1-2 b: cbcjhzllb
+17-19 z: zzzzzzzzzzzkzzgzzzsz
+2-4 d: ddkml
+6-10 m: nmmmmcwmmmlsm
+4-9 b: lhlbxslpxfbzzn
+5-13 n: njvdnxghhkxlsrm
+3-4 p: pppq
+1-5 s: sgvrgss
+1-13 h: hhhhhhhhhhhhmfhh
+9-11 w: cwwswwwnwwbwwh
+6-7 j: jhdjjjzj
+18-19 g: ggggggggggnggggggzgg
+13-14 k: kwkkkxnpkkwkmf
+5-6 f: ffffff
+18-20 c: cccccccccccccccccfcc
+2-5 d: ddhbdbl
+10-14 g: ggwgfggjggggfhlg
+11-13 q: qqsxqfqqqqqcqwqzq
+16-19 q: fqsqtqqqqrcjqqxxwqf
+6-7 w: wwwwwwx
+6-7 h: hhhhhhp
+1-8 w: twkwwbgw
+7-15 g: ggggggkggggggggdg
+3-5 j: jjjjtjj
+1-5 p: phdppmwnfxpjpbgpppbd
+6-10 b: bbbclbbbbhbbbbb
+9-10 n: nnnnnnnnnp
+5-6 n: tktfwnqcqrv
+3-9 l: lhlxflczslf
+3-4 f: fffnvthfj
+10-11 j: gjjjjjjjjjbtj
+3-8 x: dxxcrsxxbbqrfx
+2-3 h: hfhhh
+2-16 c: wcfpjtbpgbbbnnpzchn
+7-11 x: xxrxcxxvxxfjxsvpxm
+9-10 f: fffsfffsfpfff
+2-4 f: hvcf
+9-11 b: bbbbbbbbjbp
+8-14 n: qqlxkxnnhvbdzn
+7-10 v: vvvvvvcvvgxvvvvqvp
+2-4 c: ncvw
+3-4 r: rprg
+6-12 p: tpmdppppgpppgp
+6-7 t: tztrtwt
+10-11 f: qfwfcwfngds
+4-13 q: zsqqqqqtdkqgnrtqqqr
+5-6 p: phpppjpprpb
+11-12 c: cjcccccccpccp
+8-10 g: xggpbmgkfg
+9-10 l: gllllllllzl
+2-5 z: jzzjqqvp
+3-4 c: sccc
+6-13 x: xzhxgzxfxxsvxh
+7-8 n: nnnnnnxn
+18-19 t: tttttfttttrttttttttt
+10-11 l: llllllfllrl
+3-7 r: tllmrjr
+3-4 q: vqntw
+1-3 w: wjwxr
+3-12 z: zwqzjfmxgtxmqvzgqnsw
+6-7 m: wmmsmhmmc
+6-10 l: lllllrllljll
+6-8 n: nnnnnnnp
+5-8 h: shqhhfhghhqhdw
+19-20 l: lnrrrbztcfsmcjkgdzlj
+3-8 q: pxqgbqsg
+1-3 q: fqrqqqqqqqqbq
+2-7 k: skcsgnk
+4-9 v: vvvvvxvvsvvvvvzvpzq
+3-16 c: ccccccccccccccccc
+10-12 c: chdpcccccccwcdvhtmc
+6-8 s: sxmssfwdss
+1-2 b: hrbsckfth
+2-4 s: sngs
+6-8 b: bbbgdvbb
+13-14 b: bphfdzgmhhwmbhb
+3-4 h: hhhjh
+2-3 p: cppp
+13-14 r: rrrrrrrrrrrrxr
+6-8 r: drbzrhdr
+4-16 j: cmtlnsprjjfhjgmj
+1-10 m: dfsmnmmdmm
+5-11 w: gtxwxmzwwtwrmwwwgwcd
+4-5 c: cccfcc
+3-9 p: pbpppdfpfpp
+1-3 m: nmmx
+16-20 f: ffffffffffffffflffff
+2-13 v: pvmmfzmjvvqvv
+8-9 z: wrzbzzzdz
+10-11 n: nntnnvnnncn
+14-16 s: sssssssjjssssxss
+1-13 p: kppppppppppppp
+14-15 w: wwwwwwwwwwwwwmk
+3-6 t: ttkdtp
+6-7 d: dddddpdd
+5-15 r: lrpsrrrrrzrrcxng
+10-11 f: ffffffffftff
+6-10 l: lllllwllflwlll
+2-8 w: rjdvtwgw
+10-15 c: cchcccccccccccjc
+6-17 q: gjlcqjvhsbjmcgxvv
+5-11 s: ssssllsssssmh
+14-16 s: sssssssssssssssfx
+6-7 l: lnjqdlllltlvkwnvlxs
+10-11 r: lttktskrkcx
+16-17 w: hfgdbpwkqlwfvqtwf
+2-3 k: tnkp
+13-20 w: wxrcpvvxfkxnzfvgvfkn
+14-15 f: tffffffffffffrf
+7-8 q: gqqxhtfqqqqpqm
+5-9 r: dkklrrrnh
+2-15 w: wlwwwlgmhwwgwwkwz
+4-5 h: hhhthh
+9-11 x: mxxxxxxxxqqx
+3-6 f: lzfxfmjfbgrl
+8-9 s: ssstssszss
+11-13 t: lrkbvdhvjzklltk
+6-7 x: xxdgxxwgx
+2-4 n: pnnn
+8-10 d: dnhlvbddxdjgvn
+4-7 q: qqqfqqqq
+2-4 t: ljztcptpmz
+2-16 f: fqfffffffffffffff
+12-13 t: tttttttttttxct
+9-12 s: sssstssssssb
+3-11 g: nsggzgxljjlfxfl
+1-7 l: llnqshlsjl
+8-10 d: jzddhkjdwpddddddcwj
+2-5 v: rvznj
+6-8 l: lllllzljl
+1-2 v: ddvmtr
+13-18 s: bspzsssrtssdvmwqss
+5-7 s: ssstgss
+4-8 j: kqfknvjj
+4-5 x: xmxxx
+9-10 z: zzkzzzzzzpzzzzzz
+16-18 t: dttsttttttttttnttwt
+13-17 d: dbvdddddddddpfzdd
+4-5 m: mmmmnms
+2-3 f: dlzzdhh
+3-5 t: nstxrvjkjq
+2-6 d: ddfxwvd
+1-5 l: lkppsbblc
+8-11 c: ccskccccbhclc
+2-3 x: bdhx
+2-4 v: hxfhfs
+8-10 f: fgffsmfrzfqlfffmnpr
+1-4 m: qjpm
+3-4 f: fbcff
+2-5 t: ttglwxxghtznp
+2-12 l: lrllllllllllll
+2-8 m: rgmnzxxmwmbdldhbpnsp
+2-8 j: jjjjjjjjjqjjj

+ 12 - 0
3/1.py

@@ -0,0 +1,12 @@
+count = 0
+width = None
+x = 0
+with open("input") as f:
+    for passline in f:
+        passline = passline.strip()
+        width = len(passline)
+        if passline[x] == "#":
+            count += 1
+        x = (x + 3) % width
+
+print(count)

+ 23 - 0
3/2.py

@@ -0,0 +1,23 @@
+def calculate_trees(dx, dy):
+    count = 0
+    width = None
+    x = 0
+    y = 0
+    with open("input") as f:
+        for passline in f:
+            if not bool(y % dy):
+                passline = passline.strip()
+                width = len(passline)
+                if passline[x] == "#":
+                    count += 1
+                x = (x + dx) % width
+            y = y + 1
+    return(count)
+
+i1 = calculate_trees(1, 1)
+i2 = calculate_trees(3, 1)
+i3 = calculate_trees(5, 1)
+i4 = calculate_trees(7, 1)
+i5 = calculate_trees(1, 2)
+
+print(i1*i2*i3*i4*i5)

+ 323 - 0
3/input

@@ -0,0 +1,323 @@
+......#...........#...#........
+.#.....#...##.......#.....##...
+......#.#....#.................
+..............#.#.......#......
+.....#.#...##...#.#..#..#..#..#
+.......##...#..#...........#...
+.......#.##.#...#.#.........#..
+..#...##............##......#.#
+.......#.......##......##.##.#.
+...#...#........#....#........#
+#............###.#......#.....#
+..#........#....#..#..........#
+..#..##....#......#..#......#..
+........#......#......#..#..#..
+..#...#....#..##.......#.#.....
+.....#.#......#..#....#.##.#..#
+......###.....#..#..........#..
+.#................#.#..........
+.........#..#...#......##......
+##...#....#...#.#...#.##..#....
+...##...#....#.........###.....
+.#.#....#.........##...........
+....#.#..#..#...........#......
+..#..#.#....#....#...#.........
+..........##.....#.##..........
+..#.#....#..##......#.#.....##.
+..#...#.##......#..........#...
+......#....#..#.....#.....#...#
+#.#...##.#.##.........#..#.....
+...#.#.#.........#.....#.#.#...
+..#.........#...............#..
+#..##.....#.........#....#.....
+...#....##..##...........##..#.
+......##.................#.#...
+##.......#....#.#.#.....#......
+....#.#...#.................##.
+#...#.........##.....#.........
+#....#.###..#.....##.#....#....
+#..#....#...#....#.#.#.........
+.......#...........#....#.....#
+#...#.............#........#...
+.......#.....#...#..#.........#
+.##.....##.....##.......#......
+....##...##.......#..#.#.....#.
+.##.........#......#........##.
+.......#...#...###.#..#........
+..#..###......##..##...........
+.#..#......##..#.#.........#...
+...#.......#........#...#.#....
+...#....#..#....#.....##.......
+............#......#..........#
+.#.......#......#.#....#..#.#..
+##.........#.#.#..........#....
+....##.....#...................
+.......#..#........#...........
+....##.#..#......###.......#...
+....#....#...#.#......#...#...#
+.......#.....##..#....#...#....
+#...#........#.........#..##...
+...........##.........#.#...#..
+....................#....#.##..
+.#..#..#.........#....#..#..##.
+......................#........
+..###....#.......#.....###.##..
+......#......#.......#.....#..#
+.....#...#.##...#......#....#..
+.....#.....##.............#....
+....#......##..#....#.......#..
+.##....#..##......###....#..#..
+...###.#.............##...#.#..
+.....#.....#.....#...#..#.#....
+..#.#.....###......#.......#...
+..........#.##......#.........#
+..##..#.......................#
+........#......#............#..
+#..#..#..#.#......#..#....#....
+...##......#.............#....#
+...........#..#..##.......#....
+.....#.........#.#..#..........
+##...#.......#.#....#..#..#....
+#.#.#...........#.##.#.#..###..
+#..#...........#.........##....
+............#.#..............#.
+.#....#....##.#...........#..#.
+....#...#..#...#....#....#.....
+....#....#...#..#......#.......
+.#.#.........#.......#.##......
+.#..##...#........#...........#
+##...#..#...#...#.....#...#....
+....###.#..#.......##.#..#...#.
+...##.......####...##.#........
+#....#....#.#............#..#..
+#.#.#...#...................##.
+##......#...........#..........
+#..#..#....#.#...#......#......
+.##...#.....#...#........#.....
+..#............#..............#
+###........#..#....#...#......#
+###..##......#.##...........#..
+........#......#..#.....#......
+...#..........#..#...........#.
+....#..#..#....#........#....#.
+.#.................#####..##..#
+.....#...##..#..........#.##...
+..#..............#...####......
+.....#.##..................#.#.
+...#.#..#..#........#..........
+...........#....#.#..#.........
+.....##.......#......#..#.#.#..
+...#.............##...#........
+...............#.......##.##.##
+.....#........#........#.#..#..
+...#..#.........#...##...###...
+...#.#.............###.#.....#.
+.#..........#......###.#.#.....
+....##..##.............###.....
+..#..#.#...##...#.......##.....
+..........###........#.....#.#.
+#.#....#..#..#......#...#...#..
+.........#......##.......#.#..#
+...#.....#.........##..#..#....
+.....##.#..##.##..##...........
+...#.#.##....#..#..#......#..#.
+#....#....#.............#...##.
+#......#..#.####.#.##.#....##..
+##.#.#....##..................#
+.....##......#.......##.......#
+..#......#.#..#...##......##...
+..#....##....#.........#..##...
+.###.....#....##...........#...
+.........#......#.#........#...
+...#...#..#.#....######.#..#...
+###......#.#.#.........##.#....
+.....#...#.........#...#.......
+....#.............#.#.........#
+..##...#...#.......#......#....
+.....#...#.#...#...#..#........
+.#......#......................
+...###..#..#....#...##.#.......
+.#.#.....##...#...#.....#...##.
+.....###..###....##............
+.....##....#..#.....#.##.......
+#........#.........#...#..#....
+...#.#.........#..#.......#.#..
+....#.#....##.....#..........#.
+.#..#....#..#.#..#..#.........#
+#...#....#..............#......
+.........#.....#.##...##...###.
+.....#....##............#..#...
+.....#.#...........#..#....#...
+.#..........#...#......#.....#.
+.#...........#.....#..#........
+..............#......##...#..#.
+...#.........#..#....#..##...##
+..##...#..................#....
+#.....#.................#......
+...#......#..#..........#.#....
+......#..#.....#.....##...#..#.
+......#........#..........#....
+...##.##....#..##.#..........#.
+..........#..#.#.##............
+..##........................#..
+.....#.#.#......#....#....##...
+#....#.........#........#......
+.##.......#...#...#........##..
+....##......#....#.#..........#
+..#.......#..............#.....
+.....#......#.#...#..#.#.#....#
+.....#..#........#.##.##.......
+##........#..........#.........
+.....#..##....#.#......###..##.
+#.#...##.........#.#.....#..#..
+#....#.#...#........#.....#..#.
+........................#......
+....###......#............#...#
+...#..##......#..##.........#..
+.............#...#......#..#..#
+....#......#....#...........#..
+..#.#.####.#.....##........#..#
+#..#...#..#..#.......#.#..#....
+..#..#..#....#.#.........##..#.
+.......#......#.#............#.
+...#.............#.#.....#.....
+...#.#.........##...#.#.......#
+........#...#...........##...#.
+..........#....#......#....##..
+..........#...........#........
+...#..#...#..........#......#..
+......#......#....#.....#..#.#.
+........##.................#..#
+.#........#.#...........#......
+#...#........#.#.#.....#.#.#...
+.........#........#..#..#....#.
+##........#..........#....#..#.
+.#.##...........#..#.#..##....#
+.......#.#....#..#......#......
+..#.....#........##..#......###
+..#...#..................#....#
+......#...#..#.##.......#......
+........#...#.#................
+.........#............#........
+..#.....##....#.#..##..........
+#.....#..........#....#........
+....#.#...#...##....#.....##...
+..#.#.......#.............#...#
+...##..............#......#....
+#......#...#................##.
+.#.#...#.#..#..................
+...##.......#...........#.#.#..
+#......#.#.#........#.##...####
+.......#..#.#.........#.#.##..#
+..............#....#.........#.
+...........#.#..#....##......#.
+#.............#...##..#.......#
+.........#............#...#.##.
+.......#.........#.#.....#..#..
+........................#.#.##.
+#......#.#......#.........#....
+...#.......#.......#.....#.....
+#..#....#................#...#.
+........#.#..##......#.........
+#..#...##....##....##.........#
+.......#...#...###.............
+#.#..#........#.#.#............
+#.....#........##.........#.#..
+.#..........#....#.#....###....
+.#.....#...#.#........#..#.##..
+...#.##......#..#.............#
+..##..#.#...................#..
+.....#....#...#.#...#...#......
+.....#..#.#....#.#.............
+#.#....#.#.##..###..........#..
+........#.#.............#..#...
+.........#.......#.............
+.##.#............##...#........
+......#................#.......
+...............#..#...........#
+...#.......#...#.##.....#....#.
+##..##..#..........#...........
+.##.#.......#...#..#...#...#...
+....#..#...........#....#.##...
+.#........#........#....#......
+.......#...#.##.#..#.#..#......
+.#..#......#....#...##....#.#..
+......#...##.#.....##.###.....#
+.#....#..#......#...#.#.....#..
+#............#....##...##.##...
+#...#.#....#...#.......##...##.
+#...........#.##..#....#.....#.
+...#..#...#.........#.......#..
+.#....#.....#............#.#..#
+.#.....#.#...#.#....##......###
+..#..#.#.#...#..#.............#
+...#...#..#....#........#...##.
+.......#.....#...##...........#
+#.##.................#...##...#
+..............##........#.....#
+............#...#..#.......#.#.
+#.#.....#.........#...#......#.
+#.###..#......#..#..#...#.....#
+.....#.......#.................
+........#..#......#.#...#......
+#.......#..#........#...#..#...
+..#...#.......##.............#.
+#.......#.......##...#.........
+.........#....#.#..##.....#...#
+..#.....#.#.......#....#.......
+...#.......#.....#..##.#..#....
+....#.......#.#.#..............
+.#..#......#........#.#..##..##
+....#...#.##.#...#....##...#...
+#..##..#.....#.......#.........
+....#..#..#.#............#.....
+#.......##...##..##............
+...............................
+....#.......#.##...#.....#.#...
+...#........#....#.#..#..#.....
+##.......#.....##.#.#....#....#
+#.............#...........#.##.
+#...........#.#..........#.....
+#..#....#....#.#.........#.#...
+......#.#.#..#.#.#.............
+...#.....#........##....#......
+..#...#...#.#.......#......#...
+.##........#...#..#..........#.
+..#...........#..##.....##.....
+............#..#.#...#.....#...
+..........#....##.......#......
+....#....#.................#..#
+....#...............#.........#
+..#.#...#......#..........##...
+.....#...........#.........#..#
+.......#.....##.....#.#........
+.#.#..........#....#...........
+.#..##....#........#....#......
+....#.#..#.......#..#.........#
+..#....#.....#......#..#.......
+......#........#.......#...#.#.
+.......#.......#....#.....##...
+....##........#..#...#.#..#...#
+.#......#...........##....#....
+##....##......#.......#.......#
+.##....#.##......#.......##..#.
+...#..#.#.#.......#..#.###.....
+..........##....#..#.##........
+...#........###.#..#........#..
+.....#....#..##....#.....#....#
+#..........#..........#.#....#.
+..#....#.....#..............#..
+#..................#......#.##.
+.#...#.#.....#.........##......
+...#...........#.....#......#..
+......#.....#.#..##......##....
+...#....###..#.....#..#..##..##
+......#.......##..#..#.........
+#..#.#....#.#..#..........##.#.
+..#..#..##..#.#.#.#.....#......
+..#.#...#..#.....###.#.........
+##.#.#......#........#.####....
+.............#..#..#....#......
+...##..........#.......#.#....#
+..#.....................#......
+..#..#...##...#.##........#....

+ 23 - 0
4/1.py

@@ -0,0 +1,23 @@
+def validate(entry, required_fields):
+    for field in required_fields:
+        if field not in entry:
+            return False
+
+    return True
+
+entries = []
+entry = {}
+with open("input") as f:
+    for line in f:
+        line = line.strip()
+        if not line:
+            entries.append(entry)
+            entry = {}
+        else:
+            for field in line.split(" "):
+                key, value = field.split(":")
+                entry[key] = value
+    entries.append(entry)
+
+required = ['byr', 'iyr', 'eyr', 'hgt', 'hcl', 'ecl', 'pid']
+print(list(map(lambda x: validate(x, required), entries)).count(True))

+ 54 - 0
4/2.py

@@ -0,0 +1,54 @@
+def validate_int(value, mi, ma):
+    value = int(value)
+    return mi <= value <= ma
+
+def validate_height(value):
+    v = int(value[:-2])
+    t = value[-2:]
+    if (t == "cm" and 150<=v<=193) or (t == "in" and 59<=v<=76):
+        return True
+    return False
+
+def validate_hex(h):
+    return h[0] == "#" and len(h[1:]) == 6 and is_int(h[1:], base=16)
+
+def is_int(x, base=10):
+    try:
+        int(x, base=base)
+    except ValueError:
+        return False
+    return True
+
+validators = {
+    'byr': lambda x: validate_int(x, 1920, 2002),
+    'iyr': lambda x: validate_int(x, 2010, 2020),
+    'eyr': lambda x: validate_int(x, 2020, 2030),
+    'hgt': lambda x: validate_height(x),
+    'hcl': lambda x: validate_hex(x),
+    'ecl': lambda x: x in ['amb', 'blu', 'brn', 'gry', 'grn', 'hzl', 'oth'],
+    'pid': lambda x: len(x) == 9 and is_int(x)
+    }
+
+
+def validate(entry, required_fields):
+    for field in required_fields:
+        if field not in entry or not validators[field](entry[field]):
+            return False
+
+    return True
+
+entries = [{}]
+index = 0
+with open("input") as f:
+    for line in f:
+        line = line.strip()
+        if not line:
+            entries.append({})
+            index = index + 1
+        else:
+            for entry in line.split(" "):
+                key, value = entry.split(":")
+                entries[index][key] = value
+
+required = ['byr', 'iyr', 'eyr', 'hgt', 'hcl', 'ecl', 'pid']
+print(list(map(lambda x: validate(x, required), entries)).count(True))

+ 1023 - 0
4/input

@@ -0,0 +1,1023 @@
+ecl:#eef340 eyr:2023 hcl:#c0946f pid:244684338 iyr:2020 cid:57 byr:1969 hgt:152cm
+
+pid:303807545 cid:213 ecl:gry hcl:#fffffd
+eyr:2038 byr:1951
+hgt:171cm iyr:2011
+
+hcl:#c0946f byr:1933 eyr:2025 pid:517067213 hgt:173cm
+ecl:hzl
+iyr:2018
+
+pid:5253256652 byr:2009 hgt:152cm iyr:1989 eyr:1968 hcl:64cb63 ecl:hzl
+
+iyr:2013
+pid:862607211 eyr:2020
+hgt:174cm
+byr:1990
+ecl:blu hcl:#888785
+
+ecl:grn byr:1955
+pid:608098408 eyr:2027 iyr:2020 hcl:#b6652a cid:264
+hgt:181cm
+
+byr:1998 ecl:hzl eyr:2021
+hcl:#866857 hgt:189cm iyr:2030
+pid:013735467
+
+pid:075417314 hcl:#b6652a byr:1957
+iyr:2011
+hgt:154cm
+eyr:2025
+ecl:amb
+
+iyr:1993 hgt:74cm eyr:1960
+byr:2029
+hcl:293244 ecl:#3cb5e5 pid:4861232363
+
+hgt:153cm hcl:#6b5442 pid:065240897 byr:1932
+cid:196 ecl:blu eyr:2028 iyr:2019
+
+eyr:2024 ecl:amb
+hcl:#866857 byr:1922 pid:496904942 hgt:164cm iyr:2020
+
+pid:847705161 byr:1951 cid:124 iyr:1991
+eyr:2028 ecl:dne
+hcl:6b2d28 hgt:172cm
+
+byr:2007 iyr:2029 ecl:hzl eyr:2026 hgt:168in
+hcl:z
+pid:63151612
+
+iyr:2027 hgt:172in
+cid:174 byr:2014 hcl:z eyr:1921
+ecl:grt pid:#cebdc2
+
+ecl:amb hcl:#d09c0f
+iyr:2015 hgt:156cm eyr:2026 byr:1962
+pid:086120872
+
+cid:125
+pid:837849996
+byr:1958 ecl:brn hgt:166cm hcl:#ceb3a1 eyr:2028 iyr:2012
+
+ecl:gry hgt:180cm
+pid:939059935 eyr:2023 byr:1977 hcl:#b6652a
+
+hgt:190in byr:2029 eyr:1984
+ecl:gry hcl:z pid:055092916 iyr:2010
+
+hgt:63in ecl:blu byr:1940 iyr:2012 eyr:2029 hcl:#7d3b0c
+pid:163033394
+
+eyr:2040 pid:181cm
+iyr:1928 hgt:76cm hcl:d8aafb byr:1949 cid:275 ecl:xry
+
+hcl:#cfa07d ecl:oth byr:1948 eyr:2021
+pid:719690182 hgt:179cm iyr:2020
+
+byr:1939 cid:266
+eyr:2026 iyr:2017 hcl:#f116d2
+ecl:hzl pid:522421825
+hgt:68in
+
+hcl:z hgt:61in
+cid:115 pid:180cm iyr:2030 byr:2014 eyr:2032 ecl:hzl
+
+ecl:xry
+eyr:2028 pid:191cm iyr:2015 hgt:150cm byr:2029
+
+eyr:2027
+hcl:#a97842 pid:997937480 hgt:61in iyr:2019
+byr:1921
+ecl:grn
+
+hgt:163cm
+pid:912318455 iyr:2016 byr:1988 ecl:brn hcl:#a97842 cid:221 eyr:2029
+
+cid:333 hcl:#c0946f
+hgt:163cm iyr:2018 eyr:2027 ecl:oth
+
+cid:70 hcl:#c0946f
+pid:961507902 byr:1949 ecl:grn iyr:2017 eyr:2029 hgt:69in
+
+hgt:169cm ecl:amb
+iyr:2013 pid:496169901
+byr:1943 eyr:2028 hcl:#ceb3a1
+cid:249
+
+ecl:blu cid:343
+iyr:1998 hgt:154in hcl:#efcc98 byr:1972
+
+pid:508213120 iyr:2012 eyr:2025 hcl:z hgt:70cm byr:1976
+ecl:brn
+
+iyr:1924
+eyr:2005
+hcl:z
+hgt:167 pid:154cm
+byr:2007
+
+pid:761333244 hgt:180cm iyr:2017 hcl:#18171d eyr:2021
+byr:1983
+cid:67 ecl:oth
+
+eyr:1993
+byr:2003
+hcl:#602927
+ecl:grt
+cid:84 hgt:178
+pid:1847086637 iyr:2026
+
+hcl:#866857 hgt:162cm pid:483774485 iyr:2010
+byr:1946 eyr:2028 ecl:gry
+
+pid:726639691 eyr:2028
+hgt:171cm hcl:#ff65a6
+iyr:2011 byr:1989
+
+hcl:z iyr:2026 ecl:xry
+eyr:2037 byr:2005 pid:#f09a0f
+hgt:68 cid:156
+
+hgt:71in ecl:blu eyr:2026 hcl:#18171d
+byr:1981 iyr:2017
+pid:698636544
+
+eyr:2021
+byr:1957 ecl:brn pid:365378126 cid:93 iyr:2019 hcl:#18171d hgt:179cm
+
+byr:1996 iyr:2014 hgt:64cm
+eyr:2034
+hcl:z
+
+pid:629486472 cid:140
+hgt:192cm eyr:2020 hcl:#b6652a iyr:1988 byr:2021 ecl:brn
+
+byr:1955 iyr:2015 eyr:2030
+ecl:gry hcl:z pid:6550198754
+hgt:158cm cid:305
+
+ecl:gry hcl:#a97842
+hgt:176cm eyr:2022 pid:810146585 iyr:2020
+
+byr:2027 hcl:#cfa07d
+iyr:2011 ecl:#f07598
+cid:293
+hgt:150cm pid:#fa948d eyr:2029
+
+eyr:2028 iyr:2013 hgt:69in ecl:gry pid:317170371
+cid:147 hcl:#bfe1f1
+
+byr:1976
+pid:059341891 hgt:174cm
+ecl:oth
+eyr:2029 iyr:2017 hcl:#733820
+
+iyr:2018 hcl:#ceb3a1 hgt:188cm cid:308
+pid:792826885 byr:1948 ecl:blu eyr:2028
+
+iyr:2017 cid:94 hcl:#95c7dc
+pid:231757803 eyr:2022
+byr:1992 hgt:153cm ecl:amb
+
+eyr:2027
+iyr:2011 hgt:186cm
+ecl:brn pid:996347346 hcl:#866857
+byr:1960
+
+eyr:2025 byr:2001
+ecl:blu pid:755715478 iyr:2019 hgt:61in
+
+ecl:gry
+eyr:2038
+hgt:81 hcl:z iyr:2028
+cid:214 byr:1965
+
+pid:412744447 byr:1979 hcl:#cfa07d ecl:blu
+eyr:2029 cid:157
+hgt:180in iyr:1948
+
+hgt:170cm
+pid:623557081 byr:1924 eyr:2024 hcl:98d623 iyr:2012 ecl:amb
+
+cid:311 ecl:grn
+iyr:2011 byr:1982
+eyr:2002 hcl:#ef318a
+pid:0548169957
+hgt:87
+
+eyr:2030 hcl:#733820 iyr:2016 pid:558470391
+byr:1936 ecl:oth hgt:185cm
+
+iyr:2019
+ecl:amb byr:1949
+pid:376468392
+hgt:178cm
+
+pid:019195245
+ecl:grn hgt:171cm
+byr:1978 iyr:2011 eyr:2022 hcl:#733820
+cid:134
+
+hcl:#623a2f hgt:192cm eyr:2026 byr:1977
+ecl:grn cid:308
+
+ecl:hzl pid:715816358 hgt:69in iyr:2014 hcl:#623a2f
+byr:1996
+eyr:2027
+
+iyr:1947
+ecl:#39a697
+hgt:183cm byr:2029
+eyr:2022 pid:7951883913
+hcl:z
+
+ecl:gry byr:1950
+hcl:#18171d hgt:168cm iyr:2020 pid:677187333 eyr:2027
+
+byr:1969 ecl:blu hcl:#18171d iyr:2011
+hgt:162cm
+pid:701349891
+
+cid:269 byr:1966
+iyr:2011
+pid:905940527 eyr:2023 hgt:190cm
+ecl:brn hcl:#ceb3a1
+
+eyr:2027 pid:454627395 ecl:brn
+hcl:#ceb3a1 cid:302 hgt:184cm
+byr:1959
+iyr:2015
+
+iyr:2011
+eyr:2028
+hgt:166cm
+hcl:#733820 byr:1938 ecl:blu pid:857984986
+
+hcl:#c0946f ecl:brn pid:226877822
+hgt:182cm byr:1998
+cid:160
+
+hgt:186in pid:26499164 byr:2017
+hcl:z
+iyr:1998 eyr:2026
+cid:331 ecl:#236556
+
+pid:328866543
+hgt:165cm eyr:2039 iyr:1987 ecl:amb byr:2018 hcl:z
+
+iyr:2016 eyr:2036 hcl:#888785 byr:1976 pid:160402352 hgt:76cm ecl:blu
+
+ecl:blu
+hcl:#fffffd eyr:2025 hgt:66in pid:979788527
+byr:1957 iyr:2013
+
+ecl:grn pid:279357265 iyr:2019 eyr:2021 byr:1953
+hgt:177cm hcl:#c0946f
+
+ecl:oth hcl:z eyr:2025 byr:1949 hgt:189cm iyr:2020 pid:901383503
+
+byr:2019 hcl:#733820
+pid:31022828 eyr:1929
+hgt:75cm iyr:2012 ecl:grn
+
+pid:080462937
+ecl:blu hcl:#866857
+cid:102
+iyr:2013 eyr:2025 byr:1975 hgt:64in
+
+iyr:2016
+eyr:2028
+cid:125
+byr:1979 hcl:#866857
+ecl:brn hgt:173cm pid:814947616
+
+hcl:z byr:2020 pid:#c3b54b hgt:174in eyr:2038
+iyr:2016
+ecl:gmt
+
+cid:132
+iyr:1958
+pid:61543452 hcl:z
+ecl:zzz eyr:2039 byr:2006
+
+cid:55 eyr:2022 byr:1954 iyr:2015
+hgt:188cm hcl:#a97842 pid:49143631 ecl:amb
+
+hgt:152cm
+byr:1982
+iyr:2013 ecl:blu
+hcl:#341e13
+eyr:2026 pid:440841976
+
+iyr:2019 ecl:blu pid:553456616 hcl:#733820 hgt:160cm byr:1932 eyr:2030
+
+byr:1980 hgt:169cm hcl:#7d3b0c cid:312 iyr:2010
+eyr:2026 pid:028550304 ecl:grn
+
+ecl:amb eyr:2021 iyr:2014 hgt:71in pid:986053283 byr:1981
+
+ecl:oth
+eyr:2023 hcl:#888785
+byr:1949
+iyr:2016 pid:699325656
+
+hgt:63cm cid:297 eyr:2020 pid:990390922
+hcl:#602927 ecl:lzr
+iyr:2012 byr:2016
+
+hcl:9ea2fa eyr:2023 pid:088680493
+byr:1998 iyr:2017 ecl:utc hgt:170cm cid:175
+
+cid:316 iyr:2016 eyr:2026 hcl:#79ff1d hgt:65in
+byr:1997 pid:215466710 ecl:oth
+
+cid:213 byr:1983 hcl:#888785 iyr:2016 pid:767747981 eyr:2025
+ecl:hzl hgt:168cm
+
+eyr:2030 byr:1972
+cid:282
+ecl:gry hgt:178cm
+hcl:#a97842
+iyr:2018
+
+hcl:#6b5442 ecl:amb
+eyr:2028 cid:104 hgt:159cm pid:446429120 iyr:2012
+byr:1938
+
+byr:1940 hgt:178cm ecl:oth
+hcl:#ceb3a1
+pid:845683663 iyr:2015 eyr:2024
+
+byr:1940 pid:496262233
+hgt:184cm hcl:#b6652a
+ecl:grn cid:152 iyr:2012 eyr:2029
+
+hgt:185cm pid:455744229 byr:1954 eyr:2022 ecl:gry hcl:#6b5442 iyr:2012
+
+hgt:182cm byr:1966 eyr:2028 ecl:#a5b7fc
+iyr:2029
+
+pid:343591896
+cid:58
+ecl:hzl
+eyr:2022 hgt:180in byr:2021
+hcl:#6b5442
+
+ecl:utc hcl:#b6652a
+pid:635147657 byr:2020
+eyr:2022 hgt:157cm iyr:2018
+
+ecl:grt cid:312 iyr:1959 pid:154262836
+hgt:171cm
+hcl:#fffffd
+eyr:2024
+byr:1982
+
+hcl:#7a12b4 pid:223424149 ecl:hzl hgt:175cm
+byr:1930 iyr:2010 eyr:2028
+
+hcl:#c0946f pid:633476454 eyr:2026 iyr:2011
+byr:1934
+hgt:186cm
+cid:289 ecl:gry
+
+hcl:#fffffd pid:376300524 hgt:155cm byr:1964 iyr:2017 eyr:2021 ecl:grn
+
+hcl:a5d4dc byr:2006 cid:165 ecl:#db800f iyr:2029 pid:0199789970 eyr:1961 hgt:61cm
+
+eyr:2027 hgt:170cm iyr:2010
+hcl:#c0946f
+ecl:grn pid:415726530
+byr:1985
+
+cid:197 byr:1957 hgt:192in hcl:#a97842 ecl:hzl eyr:2029 pid:958973455 iyr:2011
+
+iyr:2015 pid:933689314 hgt:162cm ecl:amb
+cid:122 eyr:2021
+hcl:#6b5442 byr:1973
+
+eyr:2026 hgt:172cm
+iyr:2012
+ecl:brn hcl:#733820 pid:004474632
+byr:2000
+
+hgt:191cm eyr:2030 byr:1999 pid:9155071477 iyr:2026 hcl:#602927 cid:315
+ecl:grn
+
+iyr:2010 pid:182884251 hcl:#18171d hgt:154cm
+eyr:2020
+byr:1926 ecl:oth
+
+iyr:2019 eyr:1920 pid:132839546
+cid:283 hgt:188in hcl:#efcc98 byr:2027
+
+iyr:2011 hgt:177cm
+cid:117 byr:1976
+ecl:gry
+hcl:#623a2f eyr:2030 pid:134592046
+
+byr:1968 hgt:146
+iyr:2013 hcl:eefdc4 eyr:2028
+ecl:xry pid:722120008
+
+iyr:2016 byr:1941 hgt:67cm cid:51 hcl:#b6652a ecl:hzl eyr:2034 pid:994005715
+
+hcl:#cfa07d ecl:oth
+hgt:182cm eyr:2021 pid:612583941
+byr:1983
+iyr:2019
+
+byr:1922
+hcl:#602927 hgt:161cm ecl:gry eyr:2020 pid:190170808 iyr:2013
+
+hgt:63cm cid:136
+iyr:1999
+pid:8235748647 hcl:z
+byr:2022 eyr:1933
+ecl:#304383
+
+cid:273 ecl:blu hcl:z
+iyr:2011 byr:2007
+eyr:2020
+pid:942473857 hgt:178in
+
+ecl:grt byr:2029 hgt:187in eyr:2030 cid:160
+hcl:#efcc98 pid:#39f22b
+iyr:1966
+
+byr:1978 ecl:oth iyr:2011 hgt:164cm eyr:2027 hcl:#cfa07d
+
+hgt:75cm hcl:#1e8137 byr:1986 ecl:blu eyr:2022 pid:796688423
+iyr:2012
+
+eyr:2026
+ecl:#3013af hcl:z pid:#e8597f hgt:123 iyr:2025 byr:1942
+
+hcl:z hgt:177in
+iyr:1993 pid:#4c9348 byr:2008 eyr:1989
+
+pid:123524366 byr:1935
+hgt:156cm hcl:#7d3b0c
+iyr:2020 ecl:brn eyr:2020
+
+hcl:z eyr:2038 pid:7663741757 ecl:gmt hgt:174
+byr:2008 iyr:1939
+cid:225
+
+hcl:#888785 hgt:172cm
+ecl:oth pid:500711541 eyr:2027
+byr:1931 iyr:2012
+
+pid:575447108 ecl:amb byr:1943
+hcl:#888785 hgt:173cm eyr:2024
+
+eyr:2021 iyr:2010 pid:178773264 hgt:157cm byr:1965 hcl:#bb7bcf ecl:amb
+
+iyr:2023 ecl:#35bd84 byr:2020
+hgt:72in
+eyr:2037
+hcl:#6b5442
+pid:421311669
+
+byr:1921 iyr:2011
+pid:146088688
+eyr:2023 hcl:#15ed24 hgt:183cm
+ecl:brn
+
+hcl:#b6652a cid:243
+byr:1993 eyr:2024
+iyr:2014 hgt:172cm
+pid:771275594
+
+eyr:2024
+hcl:#cfa07d pid:858807920 cid:293 hgt:157cm ecl:hzl iyr:2013 byr:1984
+
+ecl:blu hgt:193cm cid:73 hcl:#18171d eyr:2026
+iyr:2016 pid:124151812 byr:1945
+
+ecl:amb iyr:2018
+pid:214555737 hgt:157cm
+eyr:2028
+byr:1925 hcl:#866857
+
+pid:5633250409
+hcl:4ef7d8
+byr:2004 iyr:1958
+hgt:96
+eyr:2038 ecl:xry cid:274
+
+byr:1972 pid:401239851 hgt:184in hcl:z iyr:2017
+eyr:2030 ecl:#cb289a cid:140
+
+hgt:175cm
+byr:1926 hcl:#cfa07d eyr:2029 ecl:gry pid:325039730 iyr:2017
+
+cid:101 hgt:166cm byr:1986 ecl:amb
+hcl:#7d3b0c iyr:2013
+pid:413769688 eyr:2024
+
+hgt:159cm cid:311
+byr:1993 eyr:2028 pid:188cm ecl:oth hcl:#602927 iyr:2013
+
+pid:565831038
+ecl:amb
+hgt:155cm hcl:#fffffd cid:335 iyr:2016
+eyr:2029 byr:1997
+
+hgt:122
+byr:2022
+eyr:2028 ecl:blu iyr:2017 pid:269710626 hcl:#b6652a
+
+cid:196
+byr:1953 hcl:#6b5442 iyr:2010
+pid:216121215 hgt:188cm ecl:blu
+
+iyr:2011 hcl:98166c hgt:62cm
+byr:2028
+eyr:2024
+pid:792478385 ecl:grn
+
+hcl:#efcc98 iyr:2012 pid:020039675 eyr:2021 byr:1974 hgt:156cm
+ecl:hzl
+
+cid:123 hcl:#7d3b0c
+byr:2026 eyr:2004 iyr:2012 ecl:oth pid:349203133 hgt:160cm
+
+pid:085461475
+byr:1962 iyr:2020 hcl:#623a2f
+eyr:2024
+cid:80 ecl:brn
+hgt:154cm
+
+ecl:oth hgt:156cm iyr:2016
+hcl:#6b5442
+byr:1973
+eyr:2021 pid:539898580
+
+iyr:2026 hgt:191cm
+hcl:z
+byr:1930 pid:#abc2f0 ecl:blu cid:242 eyr:2024
+
+cid:167
+hgt:179cm
+iyr:2017 eyr:2021 pid:756797571 byr:1949 ecl:brn hcl:#a97842
+
+byr:1975 eyr:2030
+ecl:oth hgt:169in pid:4031206183 hcl:#733820 iyr:2017 cid:244
+
+ecl:#54cfeb hgt:152cm
+iyr:2026 hcl:36b4b9
+byr:2030
+pid:#fa1cb9 eyr:1964
+
+byr:1974 cid:99 hcl:9e3296
+eyr:2032
+pid:686747414
+iyr:1995
+ecl:amb
+
+iyr:2030 ecl:oth hcl:z byr:1979
+pid:114661006 hgt:191cm eyr:1941
+
+hcl:#341e13 iyr:2014 byr:1953
+pid:188326193 ecl:gry hgt:189cm cid:283
+eyr:2030
+
+byr:1975
+pid:092061576 hgt:73in eyr:2023
+ecl:brn cid:227 hcl:#5e9d91
+iyr:2011
+
+hcl:#7d3b0c hgt:167cm cid:141
+eyr:1957 byr:2012 ecl:gmt iyr:2019 pid:#1b7c8a
+
+hgt:168cm hcl:#c0946f pid:599500784 byr:1930 eyr:2023 ecl:hzl cid:113
+iyr:2013
+
+eyr:2030 hcl:#b4cb4f
+hgt:68in
+ecl:brn byr:1923 pid:699162086
+
+iyr:2013
+ecl:dne hcl:z eyr:1971
+pid:#580add byr:2020
+hgt:190cm
+
+hcl:#ceb3a1
+byr:1976 eyr:2020
+cid:162 iyr:2016
+hgt:168cm
+ecl:hzl
+
+pid:050478613 hgt:59cm
+iyr:2017
+ecl:grn byr:2030 hcl:#cfa07d eyr:2025
+
+pid:352943968 eyr:2025 byr:1980 iyr:2014 ecl:gry hcl:#c0946f
+hgt:193cm
+
+pid:328621931 cid:310 hgt:170cm
+hcl:#733820 byr:1955
+iyr:2016
+eyr:2028 ecl:hzl
+
+hcl:#866857
+pid:095858739 byr:1956
+iyr:2018 hgt:193cm
+ecl:hzl
+eyr:2029
+
+pid:70973661 eyr:2039 ecl:gry
+iyr:2016
+cid:291
+hcl:#623a2f hgt:97
+
+hcl:4d51a8
+eyr:1978
+ecl:gmt
+byr:2029 iyr:2022
+pid:34507041 hgt:61cm
+
+byr:1989 ecl:brn pid:769582914
+eyr:2026 cid:218
+iyr:2020 hcl:#866857 hgt:184cm
+
+ecl:brn
+iyr:1998 cid:227
+hgt:162in
+byr:2026
+hcl:#602927 eyr:2027 pid:236998728
+
+ecl:gry byr:1984 hgt:157 cid:295
+eyr:2020
+iyr:2018 hcl:#733820
+pid:037871534
+
+hgt:166cm hcl:#c0946f pid:412146401
+iyr:2011
+eyr:2022
+byr:1938
+ecl:brn
+
+ecl:brn cid:95 byr:1981 eyr:2030 hcl:#efcc98 pid:777041035 hgt:152cm iyr:2011
+
+eyr:2024 hgt:89 pid:3761913749 iyr:1939 byr:1967 hcl:a222f6 cid:165 ecl:#7fe574
+
+cid:339 hgt:156cm
+ecl:brn iyr:2013 byr:1951 hcl:#efcc98 eyr:2026
+pid:863566946
+
+ecl:brn hcl:#6b5442 eyr:2023
+pid:787129723 byr:1949 iyr:2015
+
+pid:#7f615a
+cid:202 hcl:#6b5442 eyr:2028
+ecl:#a5419c
+hgt:75cm
+iyr:2011
+byr:2001
+
+pid:864001133
+cid:236
+byr:1943 hcl:#733820 ecl:dne eyr:2025 hgt:171cm iyr:1989
+
+pid:193073684 ecl:grn byr:1962 iyr:2014
+hcl:#cfa07d hgt:189cm
+cid:321 eyr:2029
+
+byr:1959
+hcl:#b6652a
+eyr:2026
+hgt:159cm pid:815014918 iyr:2011 ecl:amb
+
+iyr:2017 hgt:182cm
+hcl:#a97842 eyr:2023 ecl:grn pid:656177536
+byr:1973
+
+eyr:1923 ecl:grn
+cid:138 iyr:2020
+hgt:164cm byr:1958 hcl:#c0946f pid:783366277
+
+iyr:1932 hgt:172 ecl:blu
+hcl:#733820 byr:1962 pid:554221464
+
+cid:169 pid:922622614
+byr:1942 hcl:#ceb3a1 hgt:169cm eyr:2024
+ecl:gry iyr:2017
+
+cid:219 ecl:grn
+hgt:156cm byr:1998 eyr:2021
+iyr:2017 hcl:#ceb3a1 pid:450186263
+
+ecl:amb hgt:179cm pid:768428582 iyr:2010 eyr:2023 byr:1952 hcl:#fffffd
+
+eyr:2024
+hgt:193cm
+iyr:2017 pid:469033795 byr:1979 hcl:#18171d cid:67 ecl:amb
+
+iyr:2016 byr:1937 pid:798267514 hgt:155cm hcl:#866857 eyr:2026
+ecl:oth
+
+hgt:172cm hcl:#866857 iyr:2018 pid:662186551
+byr:1996
+eyr:2025 ecl:amb
+
+pid:2854521962
+iyr:2021
+ecl:zzz
+hcl:12f1ba eyr:2037 hgt:159cm
+byr:1937
+
+ecl:oth pid:488050418 byr:1927 hcl:#a97842 hgt:153cm iyr:2013 eyr:2024
+
+pid:119536312 ecl:#2036ad
+hcl:543178 iyr:2020
+byr:2013
+hgt:177cm
+eyr:2022
+
+pid:788908662 hcl:#602927 eyr:2029
+ecl:oth byr:1930
+iyr:2020
+hgt:179cm
+
+byr:1972
+pid:053386972 iyr:2014 ecl:grn hgt:65in hcl:#cfa07d
+
+pid:9828921035 ecl:blu
+hcl:z hgt:152in
+eyr:1949 byr:2010
+
+cid:157 pid:097910554 byr:1999
+hgt:159cm hcl:#6b5442 ecl:blu eyr:2024
+iyr:2010
+
+hcl:#a97842
+eyr:2040 ecl:#f8ad77
+hgt:173cm
+byr:2019 iyr:2010
+pid:#d16a6e
+
+ecl:dne hgt:191cm iyr:2020 hcl:#b6652a
+eyr:2021 pid:571971509 byr:1983
+
+hcl:#18171d iyr:2016 pid:159074622
+eyr:2027 hgt:163cm byr:1954
+cid:257
+
+pid:243560302 cid:58
+hcl:53a4cf byr:2012
+ecl:#fdbfb8 eyr:1920 hgt:179 iyr:2026
+
+pid:040606106 eyr:2030 hgt:188cm
+byr:1969
+iyr:2012 hcl:#ceb3a1 ecl:amb
+
+eyr:2022
+hgt:175cm hcl:#b6652a byr:1967 pid:269969031
+iyr:2018
+
+hcl:#18171d cid:278 byr:1931
+pid:134809791
+eyr:2035 ecl:#44e6cd iyr:1993
+
+hgt:177in
+ecl:utc cid:289
+iyr:1923
+hcl:13a67a pid:3045345984 byr:2030 eyr:1944
+
+pid:839901650 eyr:2030
+ecl:grn
+byr:2015 iyr:2017 hgt:168 hcl:131f4e
+
+iyr:2015 pid:529736732 ecl:brn hgt:176cm
+eyr:2026 byr:1952 hcl:#6b5442
+
+hcl:#c0946f
+cid:323 pid:303966428 iyr:2019
+eyr:2027 hgt:170cm
+byr:2001
+ecl:brn
+
+pid:193678728 hgt:72in eyr:2027 iyr:2015 byr:1951 ecl:gry hcl:#18171d
+
+eyr:2026 cid:283
+iyr:1938 pid:687430885
+hgt:186cm
+byr:1949 ecl:#521638 hcl:d13b2f
+
+eyr:2024 hcl:#ceb3a1 iyr:2013 ecl:brn
+hgt:168cm pid:792088241
+
+hcl:#888785 ecl:amb
+byr:2009 iyr:2015
+hgt:151cm
+eyr:2020 pid:223927808
+
+byr:1926
+pid:717704850
+hcl:#623a2f eyr:2022 hgt:64in iyr:2018 ecl:gry
+
+eyr:2023 byr:1954
+hgt:169cm
+ecl:hzl
+iyr:2010 pid:116868997 hcl:#18171d
+
+ecl:hzl byr:1965 hcl:#a97842 iyr:2011 pid:506354451 hgt:172cm eyr:2029
+
+eyr:2022 pid:994565705
+iyr:2013 ecl:brn hcl:#623a2f
+byr:1979
+
+iyr:2011
+byr:1931 hgt:183cm hcl:#284f26 cid:306
+ecl:amb eyr:2021
+pid:977533079
+
+eyr:2027
+iyr:2011 ecl:gry
+byr:1993
+pid:272334781 hgt:161cm hcl:#9a35b6
+
+eyr:2026
+hcl:#602927 ecl:blu
+pid:212300161 byr:1946
+cid:193 iyr:2020 hgt:157cm
+
+pid:538594567 byr:1976 eyr:2027 hcl:#efcc98 iyr:2011 hgt:154cm ecl:oth
+
+byr:1949
+hcl:z ecl:#ce67aa
+eyr:1942 pid:7978941589 iyr:2025 hgt:161in
+
+hcl:#c0946f
+cid:55
+byr:1963 ecl:blu hgt:161cm
+pid:547120453 iyr:2015 eyr:2021
+
+hgt:173cm eyr:2022
+iyr:2016 byr:2001
+ecl:hzl pid:239803460
+
+hcl:#b6652a ecl:oth eyr:2021 hgt:167cm pid:401266644 iyr:1969 byr:1974
+
+eyr:2030 pid:581963885
+hcl:#64cb23
+ecl:blu
+byr:1928 hgt:181cm iyr:2018
+
+pid:186338247
+ecl:hzl hgt:193cm hcl:#ceb3a1
+eyr:2022 iyr:2010
+
+iyr:2015 ecl:gry hgt:159cm eyr:2027 hcl:#ceb3a1
+byr:1925 pid:715902111 cid:149
+
+iyr:2018 hcl:#623a2f eyr:2020 hgt:162cm ecl:grn cid:135
+byr:1922
+pid:373216777
+
+eyr:2020 pid:749899012 hcl:#888785 ecl:brn
+iyr:2010 cid:225 hgt:172cm
+byr:1972
+
+iyr:2020 hgt:178cm ecl:grn hcl:#18171d pid:613792489 cid:240
+eyr:2028
+byr:1972
+
+iyr:2015 byr:1938 eyr:2026
+cid:113 ecl:grn
+pid:846231640 hgt:161cm
+hcl:#b6652a
+
+ecl:gry
+hcl:#ceb3a1
+byr:1956 cid:338 pid:936012518
+hgt:62in
+eyr:2029 iyr:2016
+
+pid:730866353 ecl:brn byr:1986
+iyr:2014
+hgt:190cm
+eyr:2021 hcl:#a97842 cid:126
+
+eyr:2021
+cid:180 pid:958310635 ecl:brn iyr:2015 hgt:189cm hcl:#efcc98
+
+hgt:188cm ecl:hzl pid:179001863 iyr:2016 eyr:2029 hcl:#341e13 byr:1932
+
+cid:77 eyr:2027 hcl:#623a2f iyr:2016 ecl:brn hgt:170cm
+byr:1947
+
+hgt:66in pid:617518313 iyr:2013 byr:1977 hcl:#b6652a ecl:brn eyr:2025
+
+pid:787861420
+iyr:2014 hcl:#623a2f hgt:61in
+ecl:oth cid:78
+eyr:2022 byr:1975
+
+ecl:hzl
+iyr:2017 eyr:2028 hcl:#602927
+byr:1958 pid:985208714
+hgt:160cm
+
+byr:2002
+iyr:2013
+hcl:#341e13 pid:188110633 ecl:gry hgt:169cm
+eyr:2025
+
+byr:1981
+eyr:2028
+hcl:#341e13 ecl:amb hgt:160cm cid:121
+iyr:2015 pid:963848397
+
+iyr:2013 hcl:#866857 pid:#db8648 eyr:2021 ecl:gry
+byr:1975
+hgt:153cm cid:114
+
+hgt:109
+cid:287 hcl:#6b5442
+iyr:2028 byr:1926 eyr:2036 pid:2378208387
+ecl:#245a62
+
+pid:857722366
+byr:1975 eyr:2027
+ecl:grn iyr:2019 hcl:#0afad1
+hgt:66in
+
+byr:1935 hcl:#cfa07d hgt:173cm ecl:brn eyr:2021 iyr:2019
+
+cid:66 eyr:2024 hcl:#efcc98 byr:2002 iyr:2010
+hgt:176cm pid:697153153 ecl:amb
+
+iyr:2019
+hcl:#cfa07d ecl:blu
+pid:695914972
+eyr:2024
+hgt:158cm
+byr:1943
+
+ecl:xry hgt:62in
+pid:14733148 cid:148
+iyr:2016 byr:1925 hcl:#6b5442
+eyr:2028
+
+iyr:2025
+cid:53 hgt:132 ecl:gmt hcl:159b19
+pid:156cm
+byr:2025 eyr:2001
+
+hcl:#623a2f ecl:oth byr:1974 iyr:2018 hgt:161cm eyr:2029 pid:6826285172
+
+ecl:gry
+byr:1956 hcl:#7d3b0c hgt:170cm iyr:2020
+
+eyr:2020
+pid:#946a88 hgt:186cm hcl:#733820 byr:1946 ecl:#016645 iyr:2015
+
+hgt:181cm hcl:#888785 iyr:2013 pid:634152817
+byr:1982 cid:245 ecl:grn eyr:2021
+
+ecl:brn
+pid:737531770 iyr:2010
+eyr:2020
+byr:1929 hgt:189cm hcl:#c0946f
+
+cid:158 iyr:2019 hcl:#341e13 eyr:2027 ecl:amb
+byr:1986 pid:834976623
+
+pid:976934668 cid:61 eyr:2020 iyr:2020
+hgt:76in byr:1927 ecl:amb
+hcl:#e05ee3
+
+pid:526042518 iyr:2019 eyr:2027 hcl:#623a2f byr:1976 ecl:amb
+
+pid:279367290 hcl:#a97842 hgt:158cm
+eyr:2027
+byr:1959
+iyr:2020
+
+ecl:xry byr:2028
+pid:357216861 hcl:#a97842 eyr:2024 hgt:66cm
+iyr:2012
+
+hgt:188in
+ecl:lzr cid:64 eyr:1958 byr:2014 hcl:z pid:285207570 iyr:2026
+
+eyr:1973 iyr:2017 ecl:oth cid:282 pid:695814158
+hcl:z
+
+iyr:2010 pid:661168409
+hcl:#53c696
+hgt:186cm ecl:amb
+byr:1960
+eyr:2029
+
+eyr:1982 hgt:169cm
+iyr:2002 byr:2025 hcl:327f93 pid:831648100
+
+byr:1967 ecl:oth
+eyr:2021
+hcl:#602927 iyr:2014
+pid:274974402 hgt:183cm

+ 33 - 0
5/1.py

@@ -0,0 +1,33 @@
+def calculate_position(code):
+    rowt = 128
+    rowb = 0
+    colb = 0
+    colt = 8
+    for l in code[:7]:
+        if l == "F":
+            rowt = (rowt + rowb) / 2
+        else:
+            rowb = (rowt + rowb) / 2
+
+    for l in code[7:]:
+        if l == "L":
+            colt = (colt + colb) / 2
+        else:
+            colb = (colt + colb) / 2
+
+    return int(rowt-1), int(colt-1)
+
+def calculate_id(row, col):
+    return (row * 8) + col
+
+with open("input") as f:
+    max_id = 0
+    for line in f:
+        line = line.strip()
+        new_id = calculate_id(*calculate_position(line)) 
+        if new_id > max_id:
+            max_id = new_id
+
+print(max_id)
+
+

+ 33 - 0
5/2.py

@@ -0,0 +1,33 @@
+def calculate_position(code):
+    rowt = 128
+    rowb = 0
+    colb = 0
+    colt = 8
+    for l in code[:7]:
+        if l == "F":
+            rowt = (rowt + rowb) / 2
+        else:
+            rowb = (rowt + rowb) / 2
+
+    for l in code[7:]:
+        if l == "L":
+            colt = (colt + colb) / 2
+        else:
+            colb = (colt + colb) / 2
+
+    return int(rowt-1), int(colt-1)
+
+def calculate_id(row, col):
+    return (row * 8) + col
+
+with open("input") as f:
+    ids = []
+    for line in f:
+        line = line.strip()
+        new_id = calculate_id(*calculate_position(line)) 
+        ids.append(new_id)
+
+ids.sort()
+for i in range(len(ids) - 1):
+    if ids[i] + 2 == ids[i+1]:
+        print(ids[i] + 1)

+ 933 - 0
5/input

@@ -0,0 +1,933 @@
+BBBFBFFRLR
+BFFFFFFRLL
+BFBBBBFLLL
+BBFBFFFRRR
+BBBFBFBRLR
+FBFFBBBLRL
+FBFFBFFRRL
+FFBBFFFRRL
+BBBFBFBLLL
+BBBBFFFLLR
+FBBFFBFRRR
+BFFFBBBLRR
+FFBBFFBRLR
+FFBFFBFRRL
+BBBBFBFRLL
+BBBBBFFLRL
+FFBBBFBRRR
+FFFBBBFLLR
+FFBFFBBLRL
+FBBFBBFLRL
+FFBBBBFRRR
+BFBFBFFRLL
+BBFBFFFLLL
+FFFBBBFRRL
+BBFFBFBRLL
+FBFBFBFLLL
+BBFFFFBLRR
+FFBBBFFRRL
+FFFBFBBLRL
+FBBFBBBLLL
+BBFBFFBRLR
+FBFBFBBRLL
+FFFBBFBLRL
+FFBFFBFLRR
+BBFBBBFRRL
+BBFBBFBLLR
+BBFBBBFRLL
+BFFBBBBRLR
+FBFBFBBRLR
+FBBBFFBRRR
+FBBBFBFLLR
+FFBFBBFLRL
+BFBFBFBRLL
+BFFFBFBLRR
+FFBBBFBRLR
+BBFBFFBLRR
+BFFFFBBLLL
+BFFFFBFLLR
+FBFBBBBRLR
+BBFFBBFLRL
+BFBFFBBRLR
+FFFBFBFRLL
+BFFFBBFRRL
+BBFBFBFRLL
+BFBFFFFRRL
+FFBFBBBRLR
+FBBFFFFLRR
+FBFBBFBRLR
+BBFFBFFLRR
+BBBFFBFLRR
+BFFFFFBRLR
+FBBFFFBRRL
+BFFFBBFRRR
+BBBFBFBRLL
+BFBBFBBRLR
+BFBFBFBLLL
+BBBFFFFRLL
+BFFFFBFRLL
+FFBBFFBLLL
+FBFFBBFRRL
+FFBBFBFRLR
+FFBFFFFRLR
+BFBBBFBLLL
+FBBFFBFRRL
+FBFBFFFLRR
+BFFBBBFLRR
+FBBFBBBRLL
+FFBFBBFLLR
+FFFBFFBRLR
+BBFBBFFRRR
+BFBBBFFLLL
+BFBBFBBRRR
+BBFFFBBLLR
+BBFBFFBLLR
+BFFBBFFRRL
+FFFBBFBRRR
+BBFBBFFLLR
+BFFBBBBRLL
+BFFBBFFRLR
+FFFBFBFLRL
+FBFFBBFLLR
+BFBBFBFRRL
+BFBFFFBRLL
+FBBFBFFLRR
+FFBFBBFLLL
+BFBBFBBRRL
+FBBBFFFLRR
+BBBFBBFRRL
+BBFBBBFRRR
+BFFBFFFLRL
+BFBFBBFRRL
+FFBBFFFLLR
+FBFFFFBLLL
+BFBBBBFRLR
+FFBFBFBRLL
+FBFFFBFLRL
+FFBFBFFLLL
+FBBBFFBRLL
+FBBBBBFLLR
+FFBFBBBLLL
+BFFBBBBLLL
+BFFBBBFRLL
+FBFFFFBLRL
+BFBFFBFRRR
+FFBFFFFRLL
+BBFBBFFRRL
+BBFBFBBLLL
+FFBBBBBRRR
+BBBFFFBLRL
+FBFBBBFRLL
+BFBFFFBRRL
+FFBFBBBRLL
+FBBBFBFLLL
+FBFBFFBLRL
+FBBBFFFLRL
+FBBBFBBRRL
+FBBFFBBRRR
+FFBFFBBRRR
+FBFFFFFLLL
+FFBBBFFRLL
+FBBFFFBRRR
+BFBBBFBRRR
+FFBFFBBRRL
+FFFBFBFLLR
+FBBFBFBRLL
+FBFFBFFRLR
+BFBBFFBLRR
+FFBFBBBLRR
+FFBFBBFLRR
+BFFFBFFLRL
+BBFFFBBRLL
+FFFBBFFLRL
+BBFBBFFLLL
+BFFBFFBRLR
+BBBFFBFRRR
+FBFFBFBRLL
+FBBBFFBLLR
+FFFBBFFLRR
+FFFBBFBLLL
+FBFBFBBLLR
+FBBBFBFRLR
+BFBBBFBLRL
+FBFBFFBLLL
+FBFBBFBRRR
+BFFBBBBRRR
+BFFFBFBLLR
+FFFBFBBRRL
+BBBBFBBLLL
+FBFFBFBLRR
+BFFFFFFLLL
+FFBFBFBRLR
+FBBBFFFLLR
+BBBFFFBLRR
+FBFFFFBRRL
+FBFFFFBRLR
+FBFFBBBLRR
+BBFBFBFRRL
+BFFFBFBRLL
+FBFBBFFRRR
+BFFFFFFRLR
+BFBBBBBLLR
+FBBBBFBLRR
+FBBFBBFRLR
+BBFBBBFLRR
+FBFFFBBLRR
+BBBBFFFRLL
+BFBFFBBRRR
+FBFFFBBLLR
+FFBBBFFRLR
+FBBFFFBRLL
+FBBFFBBRRL
+BFFFFFFLLR
+BBFBFBBRRL
+FBFFFBFRRL
+BBBBFFFLRL
+FFBFFBBLRR
+FBFFFFFRLL
+BFFFFBFRRR
+FFBFFFBRRR
+FBFBBFBRRL
+FFBFBFBLRR
+BBFBFFFRLR
+BBFFBBBRRR
+BBFFFBFLRL
+FBBBBBFLRL
+FBBBFFBRLR
+FBBFBBBLLR
+FFBFBBFRLR
+BFFBFBBLRL
+BBBFBFBLRL
+BFFBBFBRLR
+BFFFFFBRRL
+FBBFFBBLRR
+BFBBBBFRRL
+BBBBFFFRLR
+BFFFFFBLLR
+BBBBFBFRRR
+BFFBFBBRLR
+BFBFBFFLRL
+BBFFBBBRLR
+BBFFFBFLLR
+FFBFFBFLLL
+BBFFFFFRRR
+BBFBFFFLLR
+BFBFFFFLRR
+FBFBFBBRRL
+FBFFFFFRLR
+BBBBFFBLLL
+BBFFFBBLRR
+FFBBBBBRLL
+FBFFFFFLRR
+BFFFBBFLRL
+FBBBBFBLLL
+FBFBBFFLLL
+BBFFFBBRLR
+FFFBFFBRRR
+BBFFBBBRLL
+BFBFFBBLLR
+FFFBBBBRRL
+BFFFFBFLLL
+FBBFBBBRRR
+BFBBFBBLLL
+BFBFBBFLRL
+FBFFBFFRRR
+FBBFFFFRLL
+FBBBFBFRRR
+BBBFBFFLRR
+BBFFBBBLRR
+FFBBFBBRRR
+BFBBBFBLLR
+BBFBFFBRLL
+FFBBFBBRLL
+FFBBBFFLRL
+BBFBBBBRRR
+FFFBFFFLRR
+BFBBBFBRLL
+FFBBFBBLLR
+BFBFBFFLRR
+BBBBFBBRRL