aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Brattlof <hello@bryanbrattlof.com>2020-12-11 10:15:36 -0500
committerBryan Brattlof <hello@bryanbrattlof.com>2020-12-11 10:15:36 -0500
commit00b7e91794d5c59bbf99b3c69091f51af921278a (patch)
treed4282f44402d9d9dab51fac4fed5ddf24f87f583
parentf1a1437e2d6272aaa82dbc506dd4e31eaa38b15b (diff)
downloadadvent-of-code-00b7e91794d5c59bbf99b3c69091f51af921278a.tar.gz
advent-of-code-00b7e91794d5c59bbf99b3c69091f51af921278a.tar.bz2
day 2.1 of Advent of Code 2020
-rw-r--r--2020/day02/data/passwords.txt1000
-rw-r--r--2020/day02/password-philosophy.py30
2 files changed, 1030 insertions, 0 deletions
diff --git a/2020/day02/data/passwords.txt b/2020/day02/data/passwords.txt
new file mode 100644
index 0000000..1ebcffb
--- /dev/null
+++ b/2020/day02/data/passwords.txt
@@ -0,0 +1,1000 @@
+3-7 r: mxvlzcjrsqst
+1-3 c: ccpc
+6-12 f: mqcccdhxfbrhfpf
+14-15 l: llllllllllllldgll
+11-16 n: tnsznnfscnwtsdwn
+1-5 v: jvlgm
+6-8 f: ffffhfdg
+5-6 w: xmwwhw
+16-18 p: ppppppppppppppptpjp
+1-3 z: zszlzbjdcwvnr
+4-18 t: svptbwvbkqvpzbcxtc
+6-10 g: rhtwpsxrzgpgxhk
+19-20 j: zpjxfwvkjjktpkrbpdkj
+10-11 p: prppppppppnppb
+8-12 b: pzsdlxgbfkdb
+8-11 k: ktkkkjkkwknp
+5-10 w: wwwwwwwfwwww
+6-8 k: kkklmrkqsk
+14-16 z: zzsdzzzrzgkblkzw
+14-17 h: hhhhhhhhhhhhhmhhwh
+3-11 c: mjvvwjzqbwc
+2-10 k: kkkkkkkkkkkkkkkkk
+8-10 c: rjtvnjccwc
+4-6 l: wmlljl
+1-2 t: lsfz
+1-2 k: zkkq
+16-17 k: kkkdkkkkkkkkxkknkkk
+1-2 x: pcnrxx
+6-16 t: dttttttttttttttttt
+2-4 m: rrhmrkwhdfsmjxq
+12-19 v: dxvgvcgszzxvpczvxsp
+7-11 d: xddfqnddgnd
+8-9 z: zzzzzzzsz
+2-4 q: qqqqqq
+8-11 j: jkfgjkljjvd
+5-12 h: hhjhmfhrhhhh
+12-13 b: bbbbbbbbbbbrpbbb
+10-14 r: bmrttrbrmvfgcrrrj
+7-8 l: ljlllpll
+8-10 m: mmzmmmmmmh
+11-12 f: qpfffffnfffmff
+2-7 c: qcwcdns
+3-4 t: tctt
+11-20 z: zzhzzzczzzpzprzkzzlk
+5-6 v: vdvvtvv
+10-13 z: zqzzzdcjzbzzzszh
+11-20 k: xmckvrzfwrkkkjlhvtfk
+1-9 d: dwddcdddqxrdqddqd
+2-5 p: gwlpprkqkdnt
+7-9 h: hbrhphhhhkhphhh
+6-8 f: ffffxhfmw
+1-10 p: pppppppppjp
+1-3 k: wkrk
+4-9 r: rrvrrrrrrrkrqrskr
+5-20 c: dpclkznjtqdcvscwcnml
+15-17 t: ttttttttttktttrtxzt
+3-10 z: gjpszrzkkz
+5-8 f: fffffffffkff
+3-8 b: btjpwbxn
+1-6 k: zkmkkskkktkkp
+10-12 f: ffffffffffffffvfbh
+8-12 b: jxkfhgllbbtbv
+1-10 z: gcswlzkgxzxd
+4-19 p: pjppbpljprptcppvcngp
+1-16 v: trjvcgvvvvqvndmn
+7-14 x: xrxxmzxvtxnlxx
+2-3 q: wqnq
+2-5 w: mwxswhpfwnmrm
+13-14 w: wwwwwwwwwwwlwww
+8-10 q: qqpqqqqrqs
+6-9 k: sdhqvvpbfcx
+1-5 v: vvqcw
+2-3 k: tkfwjzrk
+8-14 v: vsvvfvvfvvmlvvtvv
+6-9 v: vvtvhvvvv
+6-9 x: xxxxxvxxzx
+14-15 z: dtdsfssszznpczb
+2-3 q: qjqg
+18-19 b: bbbbbbbbkbbbbbbbgpbt
+2-4 j: vtjjnvpnvmmtddqznml
+12-15 k: fknkkkkkkkkkkkk
+9-11 c: tffkcwkdrvpd
+9-10 x: xxqjxxxznx
+5-6 m: mmmmmd
+3-10 q: qzcqqjxlmjqqqqq
+9-13 r: rbbbmkmpbkwzc
+6-11 v: vvvhvvvvvvvvvvvvv
+6-11 r: rrrrlrrtrrszrr
+4-11 n: znpjndnvnnzc
+9-13 r: mrxrwwkhkrrhbrrb
+4-10 v: vvvvvvvvvvvvvv
+5-8 r: kmppsrxk
+5-6 k: lkksjk
+2-6 d: gzdthhpglpgjdj
+1-4 b: bnbb
+8-10 b: bbbbjbbrbbb
+14-16 f: fffffffffffffffff
+5-15 j: jpxjjjgjjjjjpfjjj
+3-5 z: gvxzz
+18-19 g: wggggggggggggggggdgg
+1-2 x: xpxxxc
+13-16 f: ffdffxvfffwfxmfmfrf
+6-8 b: bbbbrcbj
+5-9 q: qrmgkqbql
+3-6 q: qfqkvq
+4-6 c: cccwgc
+1-16 c: pccccccccccccccscc
+7-10 m: mmmmmmdpmcmmmmmmmmm
+6-7 r: rrprrpb
+4-5 s: sxdsn
+12-16 h: hhhxhhhhhhhbhhcq
+2-4 l: rlccllz
+12-14 g: gggggggggggmgmggggg
+11-12 b: bbbbbbbbbbjxbbjb
+3-5 r: rwcdz
+3-5 d: ddddd
+3-4 z: zzzzzz
+7-8 c: cccccczhc
+11-12 r: rrqrrrrrrtrrrhr
+3-5 g: ggggnwgp
+5-6 f: ffmfbf
+2-5 g: zgfgggtgg
+1-8 z: zwjmtrtgnzsjdmkzvk
+1-6 q: qqjjqqk
+7-10 j: jjmjjjjkgg
+16-18 g: gggggggggggggggggggl
+1-3 s: jhchssfsqs
+11-12 m: mmmmmmzmmmzb
+18-19 t: tttttttttttxtttttsht
+8-9 t: tmttttttc
+12-14 g: mmdzgggqwnwxmg
+6-8 x: csmvxkfxkg
+4-5 r: crrrz
+2-4 f: fxpq
+6-13 v: xvvvwvkvvvlvvdvg
+3-7 j: wjjxjjkjcwjpjjj
+12-16 g: xgblggrgggggggggpg
+4-5 r: wrrrr
+2-12 l: lllllllllllllllllkll
+4-6 g: sbvghg
+3-7 j: sjjccjlcsb
+2-10 j: nhjssggdrv
+1-2 n: nnnnnn
+4-9 x: xxqvgxsgnn
+18-20 m: mmmmmbmllmmmmmmmrmgn
+8-9 n: nnnnnnnnqnnn
+1-4 x: nxxzxxx
+2-12 l: lsllllllllldllxllll
+7-9 t: jvtjqtqkstttk
+15-18 m: mmmmmmzmmmmmfmcmmwm
+7-9 n: nnnnnnnnn
+1-2 k: qkbm
+5-11 m: msznmlmmmhghn
+17-18 n: nnnnnnnnnhnnnnnnlknk
+2-3 r: rrrr
+1-5 n: nslzn
+18-19 b: hnbcxvbbbmjgmrtbxbz
+5-7 r: rrrrfrjr
+8-13 x: xxkxxxxxxxxxxx
+2-4 s: qjqg
+2-14 h: hhhhhhhhchhhhmhhhh
+2-5 k: kfjqgkvmkgxkn
+10-14 v: vvvvvvvvvqvvvfv
+5-14 b: bbbbbkbjbbdbbbbb
+6-8 r: trrqqsrvz
+13-15 d: ddwdnjdcqckdzdr
+1-9 r: rrrrrrrrzrqzqrrrrrr
+16-17 v: vvvvvvvpvvvvvmvjvb
+2-3 t: xttsckjbbdtt
+8-9 h: hhhhhhhhhh
+8-10 x: cwxnpxsxpf
+3-4 w: wwww
+2-10 v: rvcgnvtpsv
+12-17 f: ffffffffkfftffffn
+4-6 n: hjdxnvbjrb
+2-3 b: bsrb
+3-8 g: kttgwvwfgdhkt
+11-12 k: kkspkkkkkdckbkzkkk
+3-4 g: ggjl
+7-9 r: rrrsrptrrrrrprcrw
+9-15 l: llhlxfldlclfzswgjlk
+4-5 p: ppppdp
+10-20 g: vhsxgvgwzkfsngszbgfm
+8-9 b: vhxlqfbwbsxkbjmc
+11-13 p: ppppppspkprplpppp
+2-5 d: pbffwd
+14-17 p: jplkcfzphzcdlpcplm
+3-11 m: jmmwtzmwmbmm
+4-8 j: xnsvfcrjsj
+8-9 d: ddddmdgdt
+2-12 w: wtwwwwwwwwwww
+11-17 m: mmmmmmmmmmmfmmmmw
+17-18 d: dddddddddddddddwfd
+2-3 m: mrhmmm
+3-15 l: zmvlldsrflxfhlll
+6-10 z: zzzzztzzzz
+4-5 j: sbrjj
+4-9 s: hdssssbkmsrrkw
+16-17 d: ddddddddddzddddbdd
+8-11 l: lllkqlnkwcmw
+17-18 c: ccccccccccccccccls
+14-17 n: hjxnnpnhftlxshnjw
+14-15 x: xxxxxxxxxxxgxdpxx
+10-12 n: rnnnnnnnnjnpnnn
+3-4 l: hvjk
+1-7 k: kkkkkkrk
+2-8 t: tvzgpsztkjxgzsqddqp
+13-17 b: bbbbbbbbbbbbbbbbj
+16-17 b: bbbbbbbnbbbbbbdbfbb
+3-4 v: vnvvt
+3-13 d: dkpdddddddddpdddd
+7-12 f: ffffftfwfffffffffbfr
+1-4 k: gppr
+1-3 t: tttt
+5-12 d: ddndddcpqjkddqwlddd
+3-8 h: rphprwhhdh
+5-6 b: jxbbwn
+5-8 x: xlxxscmwxz
+4-19 m: tlhhjnhjblzjrxpxgmm
+7-10 f: fffffffffsfff
+13-14 g: ggggggggggggdlgggg
+3-7 j: kjjpmwl
+4-6 t: zrtdgtf
+4-6 l: lsllll
+8-9 j: jjjbjqjzjjjjwj
+4-14 x: xxxdxxxxxxxxxfxxx
+6-7 w: wwxkzwwjzb
+4-7 q: bcqxkhw
+14-16 f: fdffzlffbfffpffffff
+12-13 l: gllxlllnllxlrxzllll
+3-4 m: kmdhnphcm
+2-8 m: tmnpfmlm
+7-14 x: xxxxxxxxxxxxxxx
+2-3 z: zzcf
+7-11 s: zvsrsstpssfhfmssss
+2-11 j: njmlkghhrjjx
+9-12 w: wwwwwwwwbwwww
+12-13 l: llllllllllllb
+1-4 j: jjjj
+2-4 j: jjjxr
+5-8 n: nnnffnvcnvbsnnw
+18-19 h: hhhhhfhhhmhhhhhchqh
+5-7 d: zdddzjcf
+7-11 g: ggggggggggggg
+1-3 t: ftrt
+1-2 x: pxpxmxxxxfxxj
+6-7 v: nkphvvv
+6-7 x: rxxqxmx
+3-7 j: pjfjjjxjjjj
+14-15 p: zwpctlgtldwdppjhf
+2-8 m: xmlhvvcmrbzfxmn
+8-17 w: wwwwwbwwwwvgwhwsww
+13-17 n: nnndnnnnnsnsnnnns
+7-9 c: xnrnfzddc
+1-5 s: ssssssss
+8-10 z: zjzzzzhdzd
+10-13 c: bvmrccnxcwdcz
+5-9 p: pppphppppp
+5-6 r: zdnmcrqkw
+1-3 m: mmmm
+3-8 l: ndllbnwdfmgvm
+2-5 p: kpprp
+2-3 s: sqfsssssssb
+7-8 q: qqdqjwqqc
+1-2 p: ppppp
+6-7 j: jjjjjqjjjj
+1-2 z: zzzz
+4-11 p: pvgrdzppmqwzpptptrwk
+3-4 r: rrvzr
+1-11 r: rrrrrrrrrrrrrrrrrrrr
+7-8 p: ppxppppp
+15-19 v: vvqvdvlmhqvsnvvvnvdv
+1-2 f: hfpljw
+2-3 j: cjjjx
+13-16 v: vvsvvvvsvvvvvjvkvvq
+7-12 d: ddgdddrddqddnddddd
+7-11 w: wwwwwwxwwwmwnt
+4-6 h: lfrczh
+6-7 r: rrtrhrrrrrrrh
+3-8 m: lmwmmnjmmzs
+5-6 k: bwkrkkkc
+2-4 v: cqvz
+3-4 f: pjjf
+4-7 m: rmmjzct
+1-3 t: tsttsxxhds
+5-7 g: ggggdllggg
+4-13 n: fjtmcnmvcrnfnxnwrfmq
+5-8 w: schwwlhb
+3-4 q: glqqwq
+2-7 r: tkwdmwrxkrz
+9-11 k: rbkvkkkdhlkkk
+6-7 x: xxxxxjzx
+10-16 r: rdhtslrmrrfkdcbq
+6-8 w: bjjjwwwtvwwxwm
+8-11 t: tvncrcktktts
+6-8 c: ccccchcqc
+9-12 x: xxxxxxxxxxxxx
+7-16 d: hxljdhdqkwmnhfjd
+10-12 l: lllvlxllllfmllmll
+1-9 d: ddndsdsgd
+2-9 g: ggqkpwmkc
+15-17 s: sspszcsksssgzsmls
+13-15 z: znzxzzvkpxzzzqzz
+6-7 d: tcddfdjrwzrxgdnjcd
+11-13 q: zbdbqxcqvpqgntmxq
+2-5 k: kkkkfk
+3-6 k: tkgxpsxjbkzcs
+10-12 x: fxxxxgxxxsxwx
+1-9 h: hhbbppghhhlmlxhw
+6-8 w: wwwwxwwvnqw
+13-16 g: gghgbggggdnggggg
+4-12 p: pbpbppppqppqppppp
+13-14 c: bcccccccccccdzcc
+10-11 p: pppbppjpppp
+5-6 p: pppppw
+3-4 p: gdppzmcpcp
+8-14 d: gdhddkldddxdddtdd
+3-16 g: ggdgggggfgggggghgg
+1-16 x: wgjdllqkjxxhnbvxmw
+5-18 n: nnlnhngnsnnnnnnnndn
+4-5 k: rkjvk
+9-10 j: mpxjjjjjjjjqjzjkjp
+7-8 k: kkhkbskk
+8-11 b: bbbbbbbbbbbbbb
+2-4 k: krskw
+8-10 x: xxxxxxxxxxx
+1-5 x: xfxxxtkxx
+18-19 m: mmmmmmmmmmmmmmmmmxm
+3-10 w: nwxlwvzsgkwkq
+1-3 l: ktlll
+11-12 z: sbslzvtzlzzzhg
+3-10 z: wrzzrqwlzzg
+2-6 k: kswbxkjtcqxwvxz
+3-4 t: nvtt
+3-5 w: wwnwg
+11-18 f: mtfffjpffffgmvfslfv
+7-9 m: brgcmrpxmzxttxnt
+2-3 s: hssgzs
+6-7 v: svvnbvv
+16-17 s: csfmdrsgscjvbsqqq
+7-14 g: ggggggggdggsggggg
+2-3 p: dprwpp
+4-5 s: sssxs
+7-11 f: ffffffffffnf
+6-7 n: njnlnnn
+4-5 c: cccvccn
+11-13 k: xswkdfpkkbkhskkkkmrm
+5-8 l: lldlflllllllll
+1-4 b: hbbx
+3-9 m: mmmmmmmmmm
+1-8 c: cprcfbrr
+3-4 h: dvhh
+1-2 l: lwlltl
+4-6 q: qqvqqqqqqqq
+4-9 b: vprbbbbxkgrqnn
+9-11 t: qttxztttgtttztttt
+5-10 r: rbqzrkctlhrr
+1-6 p: zppfpqpppnp
+5-7 r: rrrrxrhrrrrrrr
+3-4 q: qqlq
+1-9 s: vvsvsrsslsmssdqsjss
+1-3 m: mmrqm
+1-6 n: nnnnntn
+3-10 n: lhnbhnpgvxqfbk
+7-15 g: qhgbvggkggjggggjfwg
+3-12 t: tdtwtdptndttqcjtdtl
+4-10 x: xzxjsxxxxcxtxw
+3-10 p: fpphpvlltk
+1-4 s: dssstskszsssss
+4-5 f: cffjtf
+1-4 x: gxxxpx
+3-7 h: gwxlrhhw
+4-7 t: tttttttt
+1-3 h: hgmhh
+5-6 v: vvvvgbv
+2-4 j: ncjjsf
+3-6 j: tjfjmjc
+1-3 p: fxbwnp
+1-6 b: kfbbxb
+1-4 x: pxxnx
+10-12 r: rrrrbrrrrjrv
+1-4 b: lbbbbbb
+1-5 l: blzlt
+13-17 g: gvgggggggggzfptgg
+5-12 p: mlphpgdlmmjpnfrdj
+4-10 h: xmphdjnxzh
+15-18 m: smmmxmlmljwvmxlmkj
+11-14 g: ggfgsgggvgdgggn
+3-5 f: mffkf
+3-7 d: dndhwqdpkdstpghdrc
+5-7 f: fffflfff
+3-9 w: kbwmvhpbwgtqbfdswkl
+4-10 r: qjzrqfnvpmd
+7-16 h: tshsnbhhlhmhhhhh
+6-8 t: dcxtttkttttt
+1-3 d: dcmcdqx
+2-5 m: mmrmq
+5-6 j: jjjjjkj
+2-4 f: fdlprf
+2-4 f: dfrfc
+17-18 h: hkhhhhhhhhdhhhhhhhhh
+8-18 s: sxpstpssrrrssblsdv
+5-7 z: zzzzzzpzzzz
+2-4 t: tggt
+4-6 v: wrcbkv
+3-4 b: wgbx
+6-7 f: ffjbvfbg
+1-14 b: rbbbbbbbbbbbbzbl
+10-11 j: jjjjjjjjjdkj
+6-7 b: zdbjhbh
+3-4 c: wccccgc
+7-8 n: fnnnnnwnmnnnnnfndnnn
+7-8 b: bbbbbbtbb
+4-16 j: rrjjmgnvsvddqkjk
+3-5 j: pfjjs
+2-5 k: hkkkd
+4-12 l: lllczlllllllllll
+7-15 p: thdkpvqpppmlppppv
+6-7 x: xxxxjxcfx
+11-13 s: tssssfsbdsbss
+4-5 h: dlsmhlbwjhh
+4-16 z: gcdzjwlxtnccsvngjzm
+8-11 q: qdqtqqqkqtmqqqq
+5-11 h: hhhhlhhhhhxhh
+3-10 s: ssksssssnxsss
+3-4 g: ttgh
+2-5 j: skjxjnrb
+1-4 l: lllklq
+2-4 h: nhwzbffshjjqdhqgfd
+6-9 l: llxslllrlhzwfbl
+3-4 v: vvkb
+7-12 t: rhtzdltmdgbfptcvfr
+8-9 f: pfsfcffmgfffx
+12-13 n: nnnnnngnnnntfc
+3-5 z: dgzszvgzffswkjwnp
+5-6 p: tvvphcj
+10-11 s: gfpxwclsgvz
+16-17 n: nrhcnnnlnrcnncnsn
+6-8 d: dkcdzdzdsdncdddd
+5-9 t: pgtttktwt
+8-17 m: kczbmbkpxrpmbqpmmzd
+12-15 g: gggtgggggggcgggxgg
+5-15 r: hrznshmtrxwhqmf
+2-9 k: ntjmwhqbmz
+2-3 p: bprvhqpv
+4-5 p: pvhfp
+6-10 v: vtmcvvhcvt
+1-2 p: gpphz
+16-17 l: ppvhzpwtrkldlnsnlnl
+16-17 m: kqbmmtmmmzmmmqmjw
+18-20 k: khcsktxdxkbbvmkkkcxk
+2-8 f: fqfqpfff
+1-8 p: pktpkppphppppppppcc
+2-4 g: fhgcf
+4-6 g: ggggggggg
+2-3 c: ccxf
+7-16 r: rrrrrrtrrrrrrrrrrrr
+2-4 n: nnqnn
+3-4 l: llllllllllll
+1-7 k: kzrbfgdb
+9-11 q: qqqqqqkqhmdq
+5-7 x: kpvkxgpnngx
+5-8 r: wrtjcnnn
+7-9 r: rrrrrrzrc
+8-10 t: kgckbkgtst
+7-12 g: gglgggggggggggg
+3-9 t: dttgrtrttjj
+6-12 c: cccccfcccccgpcccxr
+7-8 b: vbbvbbpg
+6-7 p: pjxpppkpd
+12-14 z: zzzfkhmpzzfzdzz
+14-20 b: bdbvbcbbbbfsbjhbrbhb
+2-3 n: kqjvnn
+4-5 m: mmmgm
+2-4 q: xqwq
+6-7 b: xbfbpmb
+13-15 j: ghgxhdjngckxwzj
+1-7 c: wnxnndbctg
+2-7 g: ggggggggg
+1-8 t: ttntttttmtnntt
+4-7 j: jjjnzcjqbjjvjpdxjmx
+14-15 d: ddddczddddsdddxdd
+3-8 k: kkckkkkkk
+6-14 q: qqqqqsqzqkqqqw
+3-5 q: qqqqb
+5-11 h: tdpkhpxqqgmnkhxlfl
+7-9 r: jrxdqdcrrr
+1-10 z: lwsllcvzbzzzzdzzgzr
+4-9 w: wwsjbwwdhc
+2-5 f: wjsffff
+7-8 n: rbtktkmbnnt
+2-3 k: kkkjcszknc
+3-4 v: nqvlxkwrjblmgbvncvz
+9-10 g: sglkwwxggmt
+2-7 s: srcvkjxdtn
+1-2 j: mdjjj
+2-15 x: qxxsfddqknrbgmggm
+7-8 h: hhshhqhl
+4-5 p: kpppwp
+4-9 p: czcdmbwnhztncrhgnmhb
+7-14 z: gzzzqzzzjzdzzzzbzvfz
+17-18 d: dddddnddddddddddcd
+13-15 g: kxscchzmtgsvpnfbnrbt
+12-15 n: nnnjnnngnknxnnfnhn
+4-6 b: dczcbxf
+12-13 b: bbbwbsbbblbbbbbbqbt
+1-13 l: hlcnlllkgbltllf
+4-14 k: vkxbzxqkmhdksw
+10-12 z: zzzdzzzzzxvz
+11-12 c: kcpncwcccbqc
+5-8 j: jmzrzsjn
+14-15 c: ccccccccccccccccc
+11-12 v: vvvbvvllfpgn
+15-16 t: thtttttwttttpttl
+3-5 n: nnnnmnt
+2-4 x: txknc
+7-8 x: xxxxxxskxx
+11-12 n: nlwnnpzgnnnnnnnnnn
+4-5 b: bbbmb
+5-8 g: gwggfcmcbgp
+10-11 p: gpppzppdpvvppp
+5-6 h: hhhhhch
+5-6 p: gnkjsp
+8-16 w: wcswwwwwwwwwtwww
+7-8 h: hdhhhhhh
+9-10 g: gggmggsglc
+2-7 t: shbblrx
+8-9 r: rhrwrkwrrcrrrr
+9-11 b: bbbbbbbbbbbb
+3-10 c: czbzjpsnvcwl
+11-19 c: pccxcdncrtcccdbncbnc
+7-17 p: ppppppppppppppppmp
+10-12 c: ccchsfcccccc
+18-19 b: bdtrbqbwkrlblxhcrbm
+3-4 g: gggrgg
+7-12 w: wthwwwwfwwfzkwhwwwww
+3-5 d: jzddf
+7-8 q: qqqwqwqv
+4-7 d: dddddvddd
+9-12 k: jxjcfmzkkwmkmhrr
+8-13 d: dtdzwhgwzzmgv
+9-12 z: trvwkzsjwzfzcp
+12-13 r: rrrlrrrrrprdfxrrtz
+7-8 f: gzbmlnkffkgjkrq
+8-13 j: xslbjjgzrjbjms
+2-4 n: nnjnn
+1-4 f: djfgff
+4-5 w: wwwww
+5-6 m: mjmmwcw
+3-6 v: vvhvmf
+4-15 h: bhrktjhsgqfldbh
+1-10 c: zccccccccjcrcccc
+2-4 c: ccps
+12-13 v: vvbvvvsvvvcvvv
+6-7 r: rrrrrjs
+9-12 w: wwwwwwwlwwwwww
+1-3 w: wgwcwwwgxbnwwwtbms
+3-4 p: qvpnp
+14-15 h: hhhhhhhhhhhhhrq
+6-11 q: qjdkqpqtqsq
+4-6 t: xtltxg
+2-4 g: gkgp
+9-13 k: kkkkkkkkkkkkvkk
+8-10 p: lnzkglhmdglppnzlrs
+12-15 b: bbbbbbbbbbbjbvbbbbbb
+1-3 j: jtzsjj
+9-13 k: gkdkjkkdxxkkfk
+2-5 g: dgkxh
+2-10 j: zjjjxlkjjjpjqjzxnjss
+14-18 h: tvhhrzhsggdgxhrxvhv
+1-9 g: gggggggnggggggg
+7-9 z: zzzzzzzzfz
+9-11 v: vvvvvvvvrvx
+13-14 b: bmrtbbtbbbdbbnbbbcr
+12-13 k: kkkkkkkkkkjpmk
+1-8 z: nnzzzzzlzz
+3-5 g: mgcqv
+2-3 m: wgmmpm
+3-6 l: sllhsk
+3-4 v: vlmv
+2-5 t: gstgn
+1-2 v: vtvv
+8-9 j: jzjjjjjjl
+7-8 z: zzzzzzxr
+3-7 x: xxxnxxxxw
+1-4 x: xxxlx
+3-5 l: ldlmlkv
+5-11 q: npqlqqqqbdkmqwq
+2-6 m: mmmmmmm
+4-5 d: bqbdddmphblbdtdh
+4-7 l: lklllrl
+7-9 d: mjdlgfwndnqr
+2-10 w: wwwhwwwwwwwww
+4-7 j: jjjbjpd
+3-9 k: lwvkjxdkk
+13-15 f: bdrtfvlfzfqgfmff
+5-12 t: lldmbbtbrmtttrw
+9-10 q: qvqvqqqtwpqxrqq
+6-10 k: kckcsgtkrkcksz
+17-18 t: tttttttttttttztttt
+2-4 l: kdcvvsvqlx
+12-15 z: zzzzzzzzzzzzzzlz
+8-10 h: rhdkfxhflh
+14-16 f: fffffffffffffxfcfff
+8-11 k: kbfkkkkkdkkk
+1-7 k: bkkkkktrk
+9-10 b: bbbbbbbfbzb
+1-3 t: tkmtt
+3-4 m: mbwlmm
+5-6 n: npnvndr
+4-16 m: mtmmwmzmmmmtmmpnwmm
+12-16 w: wwwwwwwwwwwzwwwcwkww
+3-4 w: wwrpwmwwc
+1-2 h: hhhh
+5-9 t: tnvtrtrbfcvtx
+2-11 q: qgqcstqbqkq
+8-9 p: ppcgcxkppm
+13-16 n: nnnnpndnnlnprnnfbnnn
+7-13 x: xxcxxxpvxxxxwxvx
+3-4 q: qqqz
+17-18 v: vvvvfvhvxvvtvvvvvf
+1-9 s: cssssssssds
+2-9 z: zzpvwzzmzszmfwd
+14-20 g: cghxgggggggggnggcsld
+8-9 k: kkkkkkkxkkkkkk
+4-5 b: blbnb
+2-3 n: nnnn
+3-4 b: bjqb
+13-14 h: hhhhhhhhhhhhhhh
+12-18 g: xggggggggggsgggglxgg
+3-6 b: bbbbbbbbbbbbbbbbhd
+7-13 v: vvvdvrnvcvvvwn
+12-15 r: wrpcdrrrdrrrkfr
+3-4 d: ddhd
+12-13 k: kkkkkgkkkhkkk
+8-9 z: dbzzzzzwfzjtzzzzxzdc
+5-6 f: qfffkw
+4-5 l: lllpwcvlx
+2-10 m: nkchlsdsmt
+4-8 t: tttmttttxtd
+3-5 w: wlhwl
+9-12 x: ggqlcwxbqtgx
+2-10 b: rbpgvzwjtbj
+2-7 h: hhhnhvl
+8-13 m: cmmlsmlcmmsmk
+3-5 s: hbsjstss
+7-10 z: mtmzbtncjqzzz
+3-4 p: hpppp
+9-12 z: zznzzzzfpzzzzzz
+9-16 s: sswcsssmtqsstlffqx
+15-19 b: bbbbbbbbbbdbbbdbbbbd
+13-16 b: bbbbbbbbbbbbbbbb
+3-8 m: mmmmmmmmm
+2-3 v: qvgzgrjgfvln
+15-17 v: vwfvvvvvvvbmvvzvwvv
+4-8 d: fddldwgbddddgddd
+6-9 v: tvvxmmfzz
+8-9 k: kkkkkkkfwk
+4-6 d: dddldt
+3-6 r: lrrrjrjn
+1-6 t: tnttpgtt
+1-16 g: rgggggggggggggggg
+10-11 r: rtfdrqtrdkr
+6-7 c: jcccczh
+1-2 m: vnmmmm
+14-15 f: ffffffffffffffb
+1-7 m: smmvmmhxrmmwm
+1-6 n: nnnnnnnnnnnnngznn
+1-15 z: zzphzkhzzznzxzgznz
+2-8 z: zhwfhkbgqr
+6-7 f: ffsjfffff
+5-6 r: rrdrrsrrrr
+2-4 l: lllll
+6-8 w: wxzvzqwg
+3-10 l: gmxmtkkknlrlz
+2-4 w: cmls
+1-10 k: kkxkxkkkkkhfpkkhk
+1-2 x: nxxx
+3-8 x: llpxfhkxnsllggs
+7-13 c: cghxfmcqcsrbx
+2-4 l: lzll
+9-11 f: qffbftpbgff
+2-4 w: gwxndqdccmwwwzrmzq
+10-15 w: khfvrdbpvfmwflww
+15-18 n: nnnnnnnnnnnnnnnnnn
+2-5 z: kkzrq
+3-14 c: tcjmkcfdckqgbcw
+13-18 b: bzgqmmgrzbbvbxtwgbxd
+6-7 z: nvzmrqxbz
+1-4 x: txxxb
+1-10 z: hzzzzzqzzzzzz
+1-7 n: nnnnwngnn
+10-14 h: zmghfhnlhkqbwh
+3-5 r: zkrnr
+2-4 x: bxbw
+5-7 t: rzmkvtttpttdzvvt
+11-14 t: tttttxttttxttztmt
+2-3 c: wvdvvc
+1-4 d: qdhs
+1-2 j: flfz
+4-6 s: cdssrq
+1-11 q: qvnpngslnqqwnvtmlk
+8-9 n: mncnsnrjbl
+2-9 r: pxjjzpmxm
+2-4 q: nqzqnqfqsmw
+2-14 p: djtfdmwphwkxwb
+4-5 t: lbttt
+8-9 n: nncnnnnvxnnxv
+10-11 f: ffftffffffcfmfffz
+3-9 l: rllszlqdl
+7-11 h: hhnzdhhghhx
+2-3 h: hsnb
+3-9 v: pgxpfqsvg
+5-6 q: qqqqqkqq
+4-5 g: lgsxg
+3-5 f: ftfsbd
+1-16 p: xppppppppppjpppkpppp
+1-19 z: xzzzzzzzzzzqzzzzzzrz
+7-14 s: skmsmssjnssssv
+10-11 d: vdtddmrdtdx
+1-3 r: hmrwwn
+1-5 b: vbbbbcbb
+5-11 q: bxwlqgfqmgqcqn
+6-7 g: hkgkkrbgddw
+1-3 z: kzxz
+9-11 n: nnnnnnnnrnnn
+2-3 b: blbh
+11-13 g: ggzgpggrqpgggggbtggg
+12-15 w: wwwglwwwdjwcwwh
+6-8 p: pppppfppx
+10-12 f: fffffflfpwff
+1-6 x: nlxxxx
+1-3 m: vmxmmm
+7-19 n: nnmdnnnnntznnnnnnzd
+4-5 r: rrrsw
+4-5 z: nxszzppxcdldz
+3-5 q: tfsdqdklq
+1-3 x: mxxx
+6-10 w: wwwwwnwwwww
+16-17 h: hhhzhhhhhhhhhhhzx
+12-16 l: lllljlfllllllwllll
+2-7 c: pcvchxpf
+9-14 z: gxzjrzzzpszhzzz
+7-8 z: zzzzzzzzv
+3-14 l: llhllllllllllll
+2-5 l: wpfgl
+2-4 p: vfpqplbxpspzpmlf
+8-9 h: bxxcwhcbq
+12-13 c: xrdjccztqvvlc
+3-6 f: xfrwfffmffzvwf
+11-14 f: ffffgfflkkfffxfffff
+7-9 c: zrlhgcgcbnbrt
+8-20 r: rrfjmzgrrmprbrrcrgnr
+6-7 v: rnhvqvv
+2-4 x: xcxxwxxvxxxpxxxgv
+3-4 m: zmvmm
+1-4 l: llznls
+4-5 h: rhcsh
+7-10 c: rnjlmccrlm
+3-7 q: qqhpxcg
+1-4 f: fbfff
+10-11 g: lgggggggglp
+12-13 s: sssssssssssxs
+12-13 w: wwwwwwwwwwwwk
+4-8 r: rrrnrrrrrkr
+2-9 d: mddgrdddddddddddddm
+4-5 g: ggggz
+16-19 k: kkkkkkkkkkkkkkktkkkk
+7-13 n: qnnwgnnlnnspb
+6-10 w: gzwwmfwxgrw
+12-20 k: kkkkkkkkkkkjkkkkkkkk
+6-9 f: fffjfnffbff
+8-9 w: wwwwwrwswww
+6-15 q: qqpqnqnqxjzqtvqgwkp
+3-10 f: ffrffffffff
+2-3 c: xccgfnxz
+4-5 z: zzzxmz
+3-5 f: xmxzpwzt
+2-5 h: nghhhbsbhhh
+7-9 f: jfffffffff
+11-12 d: ddddddrdddrzd
+9-12 d: dkxkdddddddvd
+15-16 t: ttttttttttttttvt
+2-3 b: bjsdvx
+11-16 f: ffffffffpfmfffffff
+7-13 z: kpvzczcgpcnjwmmspzz
+3-4 w: thwdwwzx
+2-3 t: tttstdz
+4-5 k: kkgpkqkkrmk
+13-18 b: kzvgqbfsdpkhkpdszbxm
+8-9 h: hhhhmbhhjh
+1-4 k: kkkkk
+12-17 s: jdqnxssklhtnkttsm
+4-11 n: nnnmnnnnnnrn
+1-6 m: bmzbmlmmkmmtbmm
+6-13 p: pfppprpppmlphpzp
+3-4 w: wbws
+2-7 p: fjxvpfq
+1-3 g: ngxggggg
+3-12 p: fvpzpcblqjhp
+2-9 s: nfssdshhp
+7-9 d: lxbszxdkvpwvfdn
+11-12 b: bbbrzbqbqmgcl
+5-8 l: rlllfllfll
+18-19 t: tttttnbtttmtrttttqx
+4-6 w: vzwqxwrwwm
+7-9 c: hncwvgqccqphzcmqct
+5-10 x: btxsfrqxxx
+7-8 h: hhhhhhhthh
+3-8 n: mbddzbvnxczhbnlx
+2-9 d: dbmjjxzmfsdd
+6-7 h: xpcbthhxrszqgzzh
+9-11 d: dgdjmsdjdddddtdddd
+6-7 b: bbbbbbsbb
+4-6 z: zttxvz
+4-8 l: rmdllsllxldckgl
+9-10 r: rrxsrpfrtk
+4-9 q: qqgpqknqxqqqqsqgr
+5-7 t: mhhmttr
+11-14 t: ttttttktttcttttttttt
+1-6 l: llllltlllh
+1-13 t: jttttrthtttvpttttttt
+6-7 k: wkgkqjk
+2-15 g: gqmlgtjqwgbgdgg
+5-7 d: dqdjddd
+17-18 c: ccccccccdccccccctcc
+5-6 z: zzzzjs
+11-12 c: cvzckcssnvcs
+2-5 x: jxtqxcsppqmkkddkx
+7-8 d: pddzhmfdddccxj
+1-7 t: tgttttt
+9-10 b: bbbbbbbbdb
+14-17 c: cccccccccccccrccnccc
+11-13 j: jhtjfdwwbjjjj
+17-18 j: jjjjjjjjjjjjjjjjjj
+4-16 m: mtmqmmmspmxmmmmvm
+3-12 h: hzpjcdtnqcvchkx
+4-17 r: rrrxrrjrrrrrrdhrjrr
+10-11 v: jgvvrvvvvnvvnn
+8-11 h: hhhhphhjhlhhwhh
+7-13 h: cqwjhfkmrkqwcxdr
+5-9 t: dttccdsthzctbvqw
+7-9 d: fddhdthmdd
+3-11 d: djdmdfpdrwds
+6-12 t: klhgbgnrkttq
+4-5 k: kkkkk
+10-12 c: scjhrwzgcccb
+11-12 l: lwllllllllmtl
+3-8 j: jjjjjjjljj
+2-9 v: rjmxfglqcgq
+2-4 h: whhr
+4-8 t: hwxtstdvxb
+2-9 x: xxxxxxxxxxxxxxxxxx
+6-7 l: llvrvsl
+15-16 h: hhhhhhhlhhhhhhwn
+1-2 p: kpppppppppp
+10-14 g: xblfrggggggzjtg
+8-9 v: vvvvvvvvz
+8-16 m: mmmmmmmnmmmmmmmmm
+8-15 b: lgzzqnhpzbmvfqb
+8-10 j: jjjjjjjcjj
+1-4 v: vvvcvvv
+9-11 s: ssssstssmss
+18-19 d: xdwnjcnwrdvfftdfzdm
+3-5 h: zdxhb
+1-2 s: brstss
+3-4 l: llbl
+7-12 m: pgmfvpmsmqmmhnhm
+15-17 k: kklkkkkkkknkgnpfnl
+6-7 c: jqcqjthbcqnz
+4-6 p: pjwpkfbp
+8-9 h: htkptkfrw
+10-17 r: rrrrrrrrrrrrrrrrvr
+6-11 h: nhhqjvkhwzxdf
+2-4 n: hnvgdfnnvkn
+3-9 l: llsllllljllml
+6-8 r: rrrrrkrrj
+6-8 n: ncnnnnsn
+7-9 q: qqqqqgqqjqqqqqqqq
+6-8 p: sptppppp
+10-12 q: hfnwqvsqljqq
+4-6 z: zszzbhzzzkg
+3-5 b: bbhbbbb
+6-10 v: svwvvnvmmvcj
+3-7 q: qcbmqsqqqjqqd
+11-12 w: wwwwwwwbwwdwwl
+13-14 h: hhhhhhhhhhhhhbhh
+2-9 x: kndwpxxxqxhxsfxcg
+1-3 z: zzzzzzz
+10-12 q: qqqqqqqqqqqzqqq
+9-11 k: kknbkdkdhkkzk
+6-7 g: gggvgcwg
+6-7 s: bjtsscxs
+5-7 x: xxcxxxrxx
+9-12 w: wrwwwwwwpwwww
+15-20 m: mdpgmbmsxfbhmvmzmmmm
+11-14 k: kkkkkkkkkpkkkrkkk
+17-20 n: nnnnnnnnhnnnnnnnnbnn
+10-11 w: zwwwwwwwwhg
+9-11 r: grrzcnsvsrk
+9-15 l: glrdqzqjlfprpdldgsvc
+2-6 r: rrgplr
+5-7 q: kpqdbqk
+7-9 t: jttttgnkt
+2-13 x: xwxchfxdpxzlfxxxxxx
+4-8 z: zzzzzzzvzk
+11-13 g: ggggggggggkgxggkgg
+2-3 w: kwkww
+16-17 c: cccnvccccchjslcghccc
+4-5 q: bqbdmlqkqmtltfl
+2-6 x: gphkxx
+5-6 w: wwbqwxwwxxvgtzgbf
+9-13 q: qrqqqvqdqrbrq
+1-2 w: wwtflrlzrnckcczdsw
+16-17 j: jjjjjjjjjjjjjjjfj
+1-4 s: sssssss
+11-12 r: rmfrrrzrrrfd
+4-11 k: kkkskdhkkkh
+13-14 k: lzhkgbjxhlmljknc
+2-7 k: xmwfmkk
+9-11 v: kvzvvvwvpdvlvvlbv
+4-11 s: shsblxpqczqhwtscqc
+6-9 v: bzmqcvcfvwmh
+4-5 m: mmmxhm
+4-6 p: pqppqp
+5-9 g: rghbksgggnns
+4-11 q: qqqqqqqqrqqqqfqqxwjq
+1-8 p: pppppppzppppppppppp
+2-9 b: bbbbbrbbj
+6-7 x: cxxfxxrxdpdhx
+1-5 r: qrrrrrx
+10-15 k: kkkkkkkkkkkkkkkkkk
+6-10 r: rrrrrgrrrj
+4-10 f: pjqfldsfzbgff
+13-17 q: tbqntpzbqgsjqxqxq
+5-10 f: fcrfsdxpfffff
+5-11 s: sfxwrzcdzsngpjwwpp
+5-7 w: cjwhwwwww
+3-4 c: ccgt
+1-8 c: nccfcccd
+1-3 q: fqlqm
+9-10 f: fftflsffbf
+8-9 q: jfqkqqqns
+1-3 r: rfrjr
+1-13 f: ffffffffffdfzfffff
+6-7 k: bkzdmkv
+5-6 q: rpqqllqqbqqq
+4-10 l: lblfvpkwmgqlfshqnpfj
+6-7 g: gmhhhgg
+1-6 q: qqqqqkq
+9-11 p: pppppppgppphmbpk
+3-8 n: nnghfhnnjn
+2-3 d: vrdmd
+9-10 g: gggggzggkvggg
+3-4 g: gpgg
+16-17 z: zzzzzzzzzzzzzzzzr
+2-4 b: cvpbmnwnbrcbhbkgchkh
+12-13 p: pppppppppppppp
+2-3 c: ctzc
+1-7 b: wbbbbbbb
+7-9 d: dbddddddgd
+12-15 q: mhqwpqqqqqqqsgl
+4-5 h: bjhhhxpn
+4-5 h: kmhqh
+4-15 s: svsjtbsssssqsss
+9-16 r: rrrrrrrrqrrrrrrrr
+5-9 h: hgjzhllvhrn
+5-8 d: ddhddmvzsq
+2-4 p: pmqp
+3-9 b: nrbnqmbdbnb
+5-7 s: wstqqsbcss
+1-14 x: fxrxxxxxxfxlxn
+3-4 j: wjlb
+1-2 h: hhghhvhhnhh
+9-12 q: nqfgfkrsqxswwp
+5-8 b: bbbbpbbbb
+3-4 j: vzsv
+3-5 m: nmmmzmhtdg
+5-9 n: jdnxqkzfnj
+6-7 m: rmmfcmnlm
+7-8 t: tttthwtt
+15-18 j: jjjjjjjjjjjjjjjjjzjj
+3-5 d: rbcsdcvwx
+5-6 z: zzzzgzzzz
+3-4 t: tttqtt
+1-7 h: hhlnhfhzxhhphhdhh
+6-7 t: wtnttst
+2-4 p: zvpl
+3-4 k: swxgk
+5-7 k: kkcrkkkkkp
+3-9 x: xxhxxxxxnxxx
+11-13 p: pdpppppppphpm
+11-13 m: snglklmpcmmmm
+5-10 j: cxjfwpxjwgjh
+4-6 f: ffhffzfnf
+11-15 p: pppppppppppppppp
+3-6 h: hhhhmhhhhhw
+6-7 q: vgldrqp
+4-7 p: npzgpppdpjj
+6-7 w: wwwwwwqww
diff --git a/2020/day02/password-philosophy.py b/2020/day02/password-philosophy.py
new file mode 100644
index 0000000..d5147f2
--- /dev/null
+++ b/2020/day02/password-philosophy.py
@@ -0,0 +1,30 @@
+from __future__ import annotations
+from typing import NamedTuple
+
+EXAMPLES = [
+ '1-3 a: abcde',
+ '1-3 b: cdefg',
+ '2-9 c: ccccccccc',
+]
+
+class Password(NamedTuple):
+ lo: int
+ hi: int
+ char: str
+ passwd: str
+
+ def is_valid(self) -> bool:
+ """is password valid"""
+ total = self.passwd.count(self.char)
+ return self.lo <= total <= self.hi
+
+ @staticmethod
+ def parse(line: str) -> Password:
+ """parse test line into Password object"""
+ counts, char, password = line.strip().split()
+ lo, hi = [int(n) for n in counts.split('-')]
+ char = char[0] # drop the colon
+ return Password(lo, hi, char, password)
+
+with open('data/passwords.txt') as f:
+ print(f'total valid: {sum(Password.parse(line).is_valid() for line in f)}')