-
Notifications
You must be signed in to change notification settings - Fork 0
/
day-2.2.py
11 lines (8 loc) · 23.5 KB
/
day-2.2.py
1
2
3
4
5
6
7
8
9
10
11
iinput = ["6-10 p: ctpppjmdpppppp", "17-19 l: llllllllllllllllllll", "14-19 z: zrzzzzzztzzzzwzzzzk", "1-8 k: qkkkkkkxkkkkkkkkk", "5-6 x: xxxxvxx", "8-14 n: nnnnnnnnnnnnkfnnnnnn", "18-19 t: ttttttttfttttttttwtt", "3-13 w: wwwqwwwwrqwtzwvw", "1-3 b: bbrbb", "8-14 q: mqwmqvfqqqsqqqqqwb", "5-7 c: lxrvdcch", "1-5 v: mvdrkmrrcjnjpv", "2-8 j: jwbdjjjcjjjjj", "4-6 w: bzcwrznhhkw", "3-4 t: lttccfqlrvh", "4-6 m: qmjmrmmmnmm", "4-5 j: jjzjj", "6-9 w: wwwwwwwbz", "6-12 c: ccccxzhpfzhccdd", "3-8 j: kjpbcjhsj", "4-8 d: dtdvlbsdh", "11-13 s: ssssssssssrsqs", "5-6 k: tdkknvkp", "7-9 q: nqqqqqbqd", "2-5 l: qlvpl", "10-11 q: qqjsqqcntrl", "2-5 l: smlsl", "8-9 n: tvkqjnwnt", "2-4 j: jjtjm", "6-8 x: xjxmxvppxgdx", "2-7 p: lvpfgfpf", "3-5 b: bbbbbbbbbb", "2-4 z: ztdz", "5-6 v: vmgmvh", "3-4 q: xqzq", "7-11 s: fsscssslnpsvsfdbssbs", "11-13 m: mmmmnmmgmmmmmmm", "2-5 j: jjkjjslmgrvjxjkj", "3-9 x: rfwqjqsfxsnwqngs", "8-10 g: dggggggggrggb", "5-12 w: vkwfvmwldztwt", "4-5 j: jfrjj", "5-6 g: ggwgvqglhnggxwlzfrg", "1-3 r: jrmr", "6-9 h: hwhrhhhhkhh", "12-13 w: wwclqxhghsfgtt", "6-7 w: wwwwwlwwwwwnwww", "2-7 z: hztlxbhz", "3-8 n: vxnmjslfxngwtjds", "4-5 h: hxhhx", "4-7 k: kkkbkkk", "2-3 b: brbs", "2-5 s: csslqwg", "1-2 z: kcdbz", "6-13 w: nnwwpjfvfmwfbvpwzrcn", "2-3 g: vgqgdcqcw", "16-19 h: hhnhhhhhhhhhhhhhhhrh", "3-10 s: ssbsbsssssssss", "1-5 x: nxxxqx", "9-15 q: qqnqqqqqqjqqwqqq", "3-7 q: qqlqqqxq", "6-7 z: zszzzgzzzzz", "3-16 s: jssssrdsvsskmdssksss", "7-16 f: hfffffffffffffffff", "8-9 r: rrrrrnrrrrrr", "4-5 h: hhhdqmjnvvdndfz", "3-4 p: wppp", "15-16 k: kmkkkkkkhkkkkkzjk", "14-17 l: llnrlrljlttlrklrh", "5-7 t: ttdgttfttvptp", "5-6 q: jdqqqqqfqrqxz", "7-9 l: llrllllvllclkll", "14-18 m: mmmwmmmmmmmmmdmmmpm", "5-11 n: nnnngnnnnncfn", "2-5 d: ddrvd", "7-9 f: xfjkhcsfff", "1-5 j: njplmjjjjj", "7-10 j: kjjdjsjnvvjj", "1-5 q: vqkqq", "11-13 b: bbbbbbbbbbvbtb", "3-6 h: hmxphh", "1-4 k: jkkb", "13-15 k: kkkkkkkkkkkkbkkkkk", "2-3 q: qnqq", "12-17 k: kkkkkkkkkkkhkkkkkkk", "7-8 p: ppphpppwppp", "3-9 h: vxhgwzhkl", "3-7 d: dsgddcwk", "9-14 j: kjllchjnmpmjtjhzncd", "8-11 t: ttztxwtlvfrwg", "5-6 b: btnqnbdsbbnbf", "12-15 l: lllllsxlxllvlflmllp", "9-12 z: vbckpqzzzzpthsskdjx", "5-6 m: smgmcmdcm", "5-6 k: kkkkkjkk", "7-8 l: lllllllrl", "7-10 n: kgnllnqnnnckp", "1-10 n: wnnknnnnwnnln", "12-17 h: hhhwhhhbfhbzfhhmhhhh", "3-10 q: qqjqqqqqqqqqqqqqq", "14-17 x: xxxxxxxxxxtmxxxxxxx", "4-5 c: mtzcb", "2-7 q: smlnsqqqwkvlldj", "2-11 h: ghxhnmhfprnmc", "11-17 f: fffbffffffqfffffbn", "12-14 s: cfsssssssssssspss", "6-10 h: hhhhvwhhhh", "8-9 v: vvzvlnvvvvw", "7-8 k: kkwkkkmk", "6-8 j: jjmjjrjjj", "1-2 d: qwddd", "10-17 x: xxxxvxxkfzxvxxlxxx", "9-11 z: szzzzzzzzzqszzhs", "4-6 g: ggsggnpfgfglglds", "7-13 t: ttttttbtttttmtttttmt", "3-4 r: rrrpr", "4-5 c: zzcvc", "9-11 k: xxpkndnhkkllx", "13-14 m: jtbxmzgvmmmxmm", "6-9 n: nnnnnnnnnn", "2-3 z: fzzkqpzskj", "15-17 t: tttttttttttttttttt", "3-5 h: hhkqwgxrp", "7-12 h: jhghcmhhmcpbxzhh", "5-8 c: cdjccrcc", "7-10 g: ggggkggggqwg", "5-8 b: fttshqjghjkbfb", "13-14 d: cdkmddcqdddddzdddd", "9-14 g: ggggggggdggggxg", "1-6 p: fkpppl", "3-4 z: zfzrz", "8-11 s: ldsjssnmsssssgsgs", "8-9 z: zzfzhxztqzzlhgl", "5-12 n: pgnvncfdnnwnlkvndt", "1-3 r: lrrr", "9-12 z: zzlzzqzzzzzzzzv", "4-8 x: klhxtqpv", "11-17 k: jkckvxckkjkkkxzrk", "2-5 m: hknqmxh", "12-18 n: nnnnnnrnddjnsnnnnrnn", "2-6 r: ltgrwrrcxrrl", "1-4 l: wllllll", "14-16 t: tttttjttcttttttv", "7-8 k: bkjdmbxf", "1-12 v: vvvvvvvvvvvd", "5-18 n: nqdlvbngztlkqnshcn", "7-9 w: fwhqptwmwlkgf", "15-18 v: vvvvvvvvvvvvvvvvvmv", "6-8 g: grggxdhgbbrtmg", "3-5 w: wtzwwv", "3-4 d: ddrddt", "2-4 c: cfccc", "1-2 p: mgps", "6-10 v: vvvvvjvvvvdv", "1-6 w: wwdwwwkm", "17-18 b: bbbbbbbbbbhbbbbbmbbb", "4-11 s: swzshhfggxqp", "4-15 b: bbbwbbbbbbbbbbbbb", "9-14 h: hhhxhhhhmhhhzhqhfq", "9-10 n: nknnnnnndn", "15-17 q: qbqqqgtqqzzlklrmq", "4-12 x: xxxxxxmxxxwwdxgxx", "1-2 l: llcllqlzlhc", "4-11 z: frrzhmvlwjm", "8-9 f: ctsfbqdft", "3-5 l: lwkmlflqlsl", "7-11 x: cfkscxpmxjxtxl", "4-7 l: bfxhlml", "1-5 k: drkrxzkkxhtkbq", "4-9 v: gvvvvqvvwvtv", "2-6 k: kkkqklk", "11-14 r: rrqdvdgrrbrrhb", "19-20 h: hhhhhhhhhhhhhhmhhhhl", "3-4 z: zrzz", "1-5 x: xxxxxxx", "18-19 k: kkkkkkkkkkkkkkkkkmk", "7-14 b: bbbbbbwbbbbbbbbbbb", "12-15 p: pbppppppwpkppphpwcpp", "4-5 c: ccczjc", "10-17 n: nnnnnknnndnnnnnnnnn", "6-8 j: jzjjjjjk", "7-10 g: gwggvggtgg", "14-18 r: rrxrrwrhhrrcrqsdrr", "10-15 p: pmjjpdvxwprlhhxbcv", "4-9 h: bxchmcfxhhbfhvfsdxn", "7-15 w: gfwczdrhwqmmmvw", "3-9 d: zhttdhdvd", "1-4 p: pppmpp", "12-13 z: zfzzzlzzzzzzzzzz", "4-5 p: ppppqwpxppp", "3-20 x: ccxwrgxhjjkfnsdnjjnj", "9-10 j: wjdjjhrzqq", "17-19 t: tttttpttttzttttwtqtr", "12-14 r: rrrrrtkrrrrlcdrr", "2-13 b: bbbbbbbbbbbbgb", "9-15 g: tgrphjgdgsglgmkm", "10-14 c: pwvrltccjccczccbt", "4-7 f: lffxfffz", "7-8 r: rdrcvrrc", "3-4 t: xtftv", "10-13 r: rnrfrrrwrftkrrr", "11-12 r: rrrrrrrrrrlrmrr", "14-18 w: wwwwwwwwwwwwwwwwwwwr", "1-8 b: bbbstbrbbbmbbb", "2-3 x: xxxl", "3-4 r: rrntr", "2-5 k: pljkb", "7-11 x: vzxxqxfhxgxqxxkxx", "11-13 c: ccccflcccjmcv", "9-11 l: nlvllllllll", "10-11 t: ttttttlttdttttxtt", "14-18 w: wwwwwwwwwwmwwgwwwz", "8-10 g: grtxrzlscxtkjjwk", "7-19 x: hkrxxxxxhxbvxxxxxkd", "10-12 c: cccxppcfccmcnccccc", "17-18 l: llllllllllllljllml", "7-16 v: vvhbvvxvvvqvvvvpvvvv", "12-18 q: qqqqqqqqqqqkqqqqqqq", "1-3 v: crvd", "11-13 b: zbbbbbbgbbhbb", "9-11 v: vvvgvhvvlvv", "3-4 r: rlrv", "9-16 m: mmmmmmlnnmmmmmrmmmk", "10-18 s: ngxsssxkxfmfswssvsfc", "6-10 g: ggzgwngggggggtqgg", "9-11 m: mmmmmmrmmmmmmm", "3-4 l: jlrl", "8-10 k: kkkfqkghbkzkkkkk", "3-7 b: jwbhbhc", "4-15 r: vklggxjgtgmzrlrw", "16-18 f: fgnfvzxffprlpxwjrf", "5-8 p: pprdhbzpp", "10-12 r: rqmrkrfrkrrrrl", "8-9 b: bbjkbbtbc", "10-14 q: hqqqqqqvqmqzfqqqqqq", "3-4 q: pwgq", "10-11 m: mmmmmmmmmwm", "9-11 d: tqrdldddddrjcddcdd", "3-7 b: pbskmbb", "12-13 b: fwbbbhbzbbfbrf", "3-7 p: lppbnxvpphd", "15-17 g: hpccghbgqtxgvggxg", "2-7 m: sfwxfjmmrt", "3-20 d: rgdbhfmhqqqfzbnjrddx", "1-3 q: nqlmqnd", "12-17 p: pppppppwfppppppppp", "2-11 c: gctbkccdhqrgchsvccc", "3-6 k: kxkkfk", "9-10 n: nnnnnnnntf", "2-5 z: zgzrzzz", "5-6 g: gggggv", "9-14 z: szzzzzzspzzczjzz", "15-18 f: ppfvfhfffxfffpffrv", "8-15 n: nnnqvnmkmndnddnb", "2-3 z: vkzngkxsszvlvjk", "5-9 q: qqqqwwqqqqqqq", "3-13 m: mmhmmmmmmmmmgmmmmm", "4-5 s: xssss", "2-3 n: vnfn", "8-9 d: drdddlsdndx", "3-4 v: vvvn", "2-8 c: ccgbxccfclcwc", "1-4 b: mbbb", "7-15 p: pnpqxnmmfkxqvppkpp", "6-7 g: pkdgdpz", "1-3 t: pxkttttjhttt", "14-19 j: jkjjfjjjjjjjjjbjjjj", "1-5 h: bwhhhlhh", "16-17 z: xnzsgxztwbwnrlzzz", "5-13 p: cspppppppzprkv", "8-9 x: xsxnxwcxjxjbxxxp", "13-14 w: wwwwwwwwwwwwrtww", "3-15 w: wwbwwwwwwwwwwwdwwwww", "6-7 d: dddbbdd", "4-9 z: zzzzzzzzqzz", "4-5 j: jjrwd", "12-15 k: kkkkkkkhkkkkkkxkk", "10-11 j: vjmjwjjxgjjhjm", "8-9 v: skspbvwvp", "1-14 n: drnwljkphztfcn", "9-12 s: ssssssjswsshss", "2-7 x: hxpcbdwjxs", "3-7 n: bgnpmrm", "4-15 d: dddfddddddddvdd", "15-16 p: pppppjpppppppppxpp", "8-14 r: rrfvrkbrgpqrplnvhxzr", "2-5 c: cccccc", "1-6 g: ptggggjl", "11-12 g: gbgpfwwggsgh", "1-2 z: wzjcmw", "1-7 m: rmmmmmtmn", "16-17 q: qqqqqqqqqcqqqqqql", "1-3 l: lllhdwldl", "7-8 k: gbhkkvkl", "1-7 j: jmjjrdt", "3-6 s: spsssxbsssss", "7-13 v: vvvvvgvlvvvvbv", "11-12 h: khhghhjffmvhk", "17-18 s: sssssssssssssssssmss", "8-16 t: ktcpqlrrtdttttxtkxn", "9-11 b: bsbbqwbbcbbbwhv", "5-10 k: kbtktnxdkzkkkrxtck", "4-8 r: vrwwrvrr", "18-19 x: lkxxqprxxxzrwkqxxgx", "6-14 x: xxxxxxxxxxxxxdxx", "10-13 p: fkpprwplppppbp", "12-16 c: vcvgccccclbccgcctccc", "2-8 c: cscclccczcgccnc", "13-15 r: rrrrrrvrcrrrrrrrrrr", "6-7 f: cfvfhbf", "4-5 h: bcqbknlhwfm", "3-18 g: chglkvkxgczqpnvgzp", "1-3 h: fhbhh", "1-2 v: vqtv", "7-14 g: jgscbrgwgbggvglgkhd", "2-8 p: plppppphp", "11-13 c: ccsccclcccrcsccc", "12-13 r: rkrmrsrrprrrrr", "1-6 m: ndmmqg", "1-3 k: jkskk", "6-9 p: htffzfvrppwln", "10-11 s: vksxsssssscdssw", "5-8 s: svfcdwss", "10-19 t: ttttwtttvttmttttttft", "6-8 h: hhhhhhhgh", "5-18 m: rcchmqmzlpptkcnhdh", "1-3 m: mmdmzxtlm", "1-7 l: lllllllbll", "16-18 t: tttttttttttttttttttt", "7-9 t: tttdjrtttkthjd", "5-19 v: xthgjgvrdwtqbrsbgkv", "2-6 k: whkgxk", "11-13 q: qqqjqqvlqqqqdq", "6-12 g: gggggfggggjncgg", "9-14 q: qhqqqjkttqqqqw", "6-9 n: nnnbnnnfgn", "4-16 d: ddjldddpvddddrdd", "13-14 r: rrrrrrrrrtrrkj", "1-3 q: qqqq", "3-6 s: hgtssssqgflb", "10-14 h: hghhhghhrhhhhshhhh", "3-5 s: pvsssgs", "3-4 g: ggzbgxgggggggqgggg", "2-4 d: dqdddddd", "1-11 b: bbbxbdbrbbbbbbbbbbn", "8-12 p: gppwpgpxpvpppbs", "3-7 p: dpzppppp", "7-20 r: zbczqrrpjpgrkrzdvmrn", "9-15 w: wpwtwwwwwwwwwwvrkwr", "14-16 p: pwpbpppppgpppmppp", "8-9 q: ngzdqqjmqvj", "4-9 t: tltltttktttttttt", "2-4 w: kzmw", "3-6 r: rrmrxqr", "4-5 z: zzzzjz", "4-8 w: wkwxbwwcwww", "8-10 k: kkbqnkkqktxzkk", "6-7 v: vvvvvnvvvvvvvvv", "8-9 s: dmmgsmxssffbmtncj", "7-9 f: ffdwfzqfffffms", "11-18 b: jbcjdgppcjrhpbcswvsd", "3-9 d: ckdcmmdhdldgsx", "2-3 d: cqxvd", "1-11 t: tftttstmftttttttttdt", "2-3 d: ddtd", "1-9 k: kkkkkkrkmkkkkg", "6-11 d: dxkdthdxgxdslgsd", "9-10 g: gggggfggkxg", "6-7 c: ccccccccccc", "15-18 z: zzzzzzzzzzzzzzxzzm", "10-11 n: xnnlnrqnvnj", "3-4 d: hdrz", "4-5 h: wrtgh", "2-4 n: nnnnn", "11-12 g: ggggggngggggg", "9-10 b: bbbbbbbbbn", "2-10 j: vjgbvjlwxwts", "3-11 t: jcttqqhtdkttcnttdfx", "9-10 w: gzwwtwwwwwwwnw", "12-14 t: ttttlljzpmwrcl", "6-12 b: pzmbrbbvbkbbdctbbqb", "1-3 m: mmmmh", "13-15 r: rrrnrrrrtrrrrrl", "9-12 l: psscllxhtllw", "7-8 b: bbbbbbbbb", "8-9 s: hmsztljsm", "11-14 x: xxxxxbxxvxdxnx", "3-6 b: cbhsbb", "14-17 v: vvvvfvvvvvvvvvzvz", "7-8 k: kkhvbwgk", "18-20 h: vqnpzsvhplfhmmqjhhkl", "4-9 n: nnnnnnnnjnnn", "13-14 t: ttgttttjttttktttvqt", "9-17 z: hwzlczpjzzbqcdgzj", "9-11 c: cccccccczcv", "2-8 s: skssssss", "6-12 g: vtfrgjgvzhngd", "10-11 v: vvvvtzjzvvbvvvvvvvv", "5-7 j: jfjjzjgjjx", "4-7 m: mhmmmnrmlmqw", "7-11 q: jcntkgqrqcr", "18-19 c: ccccccccmcxcccccccpc", "5-6 m: gmmntmmpdhqmbfvcck", "6-17 g: qgqgdwdvggfzrlbvgg", "4-8 k: fbzqkmhh", "11-12 c: vccccccccvmc", "1-5 z: zzgzqzz", "11-17 f: ffffffffffffffffff", "8-9 v: jrcbrvslv", "1-4 w: rwwww", "10-12 x: xxnzxxxxxxxfxx", "3-5 b: bzbcq", "3-6 x: rndsxxr", "11-13 n: svqnnnznnnnml", "2-5 t: ttqwx", "4-11 c: cfdfcsgnccc", "12-13 s: sksssssvsssstss", "2-4 s: sszhr", "18-19 x: xxxqxxmxxxflxxxxxxx", "4-14 b: nbbjbbbblbbbbb", "15-17 q: qqrzmqqqqlktlhqrh", "2-5 j: cjxstjtdmvz", "1-18 s: ssssskssgxssshssst", "12-16 m: hzkmmmwmmmmwmhmmmbm", "5-7 m: mmmmmvv", "1-4 r: rnln", "19-20 k: kkkkkkkkkkkkkkkkkksk", "12-18 t: ttlvttqrtbbpttztttt", "9-15 w: jvqtwzwnhrmgjvwl", "9-13 l: lrgdllkgbjvjljdmvmjt", "3-5 g: ggtgggg", "4-7 q: lrlqqkqmjqqwfqq", "6-8 q: qqvqqchr", "1-3 q: qltqr", "13-18 w: bpwpwwgwwgwpfddwfwww", "7-15 t: wttttthtttttttkttbt", "1-6 n: tnnnnnnrnnnnnnlfn", "6-7 p: kpwdppv", "3-5 b: bmbzb", "4-5 h: hqgqpbhj", "2-12 k: fsxfrnjkmwgkw", "1-14 g: ggggggxggggvgwg", "2-16 d: dddddddddddddddmdddd", "12-15 z: zzzzzzzzzzzzzzsz", "13-19 z: zzzztzzzxvzzzzzzzzzz", "10-11 d: dtlddhddsjf", "3-11 x: xxxxxxxxxxxx", "9-14 w: wwdwwwkwdwzwwwf", "14-19 v: cpzcvwkqknscrvqtmfv", "4-18 g: ggggggggggggggggggg", "1-3 w: mwqwwwwwww", "2-8 m: dmnwmjmzw", "9-11 x: xxxxxxjvxxtfx", "2-4 g: ggzb", "6-9 k: kkksskkkx", "9-10 m: kmmrmvvmmm", "2-4 s: ssspsss", "17-18 w: twjlvjbmhpxgchtnmcs", "13-14 m: mmmmmmmmmmmmlmm", "4-7 g: gggvggvgdgg", "11-12 c: zbcchcjtcmhcbhcpcc", "5-8 l: hlbhlmflk", "1-5 s: sssssss", "1-5 f: sfnffwfffffk", "7-8 j: jjjjsjjj", "2-3 x: rxlxvb", "6-14 s: sqsksnsssdsdfds", "16-17 v: vsvlpcvpkvvjvkvbj", "1-12 r: hrrrrrrrrrrdr", "2-3 m: mmqmmdm", "10-13 h: hhqhhhhhhfhhbh", "1-6 k: gkkkkkk", "6-7 z: zzzzzzz", "2-14 z: zqtzzzzdszszzzvzpnz", "9-15 t: twczgnntkttghtvtbht", "5-7 g: gfpvvkgk", "10-15 z: bzzzszzztkzzzzzzzzz", "4-5 z: zzfzzzjwxzcw", "12-15 f: fffffffffffpffff", "2-4 w: twwsft", "3-9 b: srbwfkbcw", "7-8 g: brwgmgjgdm", "5-7 v: vvvvvvvvvv", "7-14 n: mcznzntcndsqhrvmg", "2-9 k: kvbpxbrjrkqqrzvkdvsk", "4-6 x: xxxvxx", "7-10 k: lkdmtlkrpk", "1-6 b: bpxsqbbbbfk", "3-6 c: cccccxcccccc", "11-13 k: kkkkkkkkkkhkkk", "6-7 q: fxnqtpqnxllqqg", "13-19 t: dtxtthttttttttttztvt", "4-5 h: dcvkh", "2-5 v: rvstj", "12-13 c: cccccccccccht", "4-8 g: gvgggggvggggggg", "1-4 g: gggg", "13-15 x: xqxdxqtmxzfxxrq", "4-5 c: ccphw", "16-18 m: mmmmmmmmmmmmmmmmmh", "12-18 c: cccccccccccrccccccc", "4-6 h: zlkhfh", "6-8 f: fffvsfblfbff", "9-14 h: khddwkfzlpmqfhv", "2-6 m: mcmmmm", "11-13 d: dddrdddddldds", "12-13 s: sqwhcxsqnskmsmtqvgr", "2-10 b: hblmkzhlgjcb", "1-10 h: bzwxpxqtjbhbmmf", "15-16 r: rrrrrrrrrrjrrrrsr", "6-12 s: sssssnssssssss", "1-9 n: nnmnkngnw", "4-6 x: xxxxxwxxjx", "5-6 p: ppbktpjzdppj", "13-17 s: sssssdssvsmjqfstpss", "3-7 t: ctwtbkwjt", "13-14 x: vxxxxxjflxnxtn", "4-17 j: qmjjnjlqjjgpcjlwz", "5-7 p: cvscpsvbcpvbfplqhpp", "11-13 z: zzzzzzzzzzzzz", "3-4 c: bqgkch", "8-9 h: hhhhhhhld", "10-13 p: bpppppppvpppkppn", "5-6 l: lllllzlkqll", "4-13 t: xbkssqrtvjthtx", "2-3 q: vqfqr", "7-9 l: llllnlllgllllll", "4-5 h: hhhdh", "3-5 z: zzzzrptzzxz", "10-13 q: qjqkqqqzqqqqwq", "3-5 v: vvbvvvv", "7-16 j: nbbzpjmqmzfhjcjjz", "3-7 s: swvssss", "13-15 s: sskxmfsfsvpsssps", "2-5 m: mmmmwm", "5-7 b: hbbbbbsb", "1-2 d: dfwffsnttmmn", "4-17 g: gggvggfgggmgggggg", "6-7 w: fwfnwwwv", "3-5 c: ccccc", "5-6 v: vxvvvvvvvv", "6-8 p: zppppppppphh", "3-9 f: nkfqxsffb", "6-7 n: cnnjnnh", "12-14 c: cvccccccccckcc", "13-14 x: mxxxsxxxxxxxmxxx", "2-3 w: wwsr", "6-7 h: hhhhhdhh", "9-11 b: wtbqzbbbbbcbnbbbbb", "1-2 b: blbb", "1-5 m: lwlmmxjx", "2-6 k: kkkkkxk", "2-10 j: fwcjktmrxmp", "2-5 b: bbbblh", "14-16 n: nnnnnnnnnnnnnnrnnnm", "2-3 h: hzhxt", "1-2 m: mmmb", "12-13 b: bblbbmzqbbbbcbbnbb", "15-17 g: xvggggqgmjwmgrhgg", "3-4 t: tszs", "2-5 l: lnllplll", "16-17 p: pmpppppppppppppnplp", "16-17 j: jkjjrjjjjjjjjjjxtjjz", "6-11 j: jjjxjhjjjljjjjjj", "7-16 n: xndnnljsnnggnfnqnnhn", "3-5 n: wnnnbnnkj", "9-13 r: rrrrrrrrjnrrrrr", "1-6 h: jhhhhxh", "12-16 w: qlwwgttwvwtfswwk", "1-5 d: wbdgdglmdm", "4-15 m: xwvxmvncxdvjbhq", "4-6 h: hmmhhhns", "4-13 n: nnncnnnnnnnnnnn", "1-5 c: cpcvcc", "1-14 h: hjdqjwffkrkxsnhh", "1-5 d: dkdhf", "3-7 c: mcbbvvc", "7-10 p: xpppwpnppp", "17-19 r: mrnrvpjtgttxppwwrkzj", "1-7 q: qqtvqvqqfqn", "6-17 s: qcsrpwspszcssssscxp", "1-3 x: dtxlnlbqjqsnxxfxr", "13-16 g: gggggggggggwgggg", "2-8 j: xfjpwsqj", "4-9 j: jjjnjjjjpjjj", "2-7 j: gjfllhcswc", "7-20 b: wphrpjmzfpxfcbpbmbfv", "6-10 c: fclccchhrc", "7-13 k: pvjmksdkjkdtkkxck", "2-5 r: rhrrqrr", "10-11 b: bbbbbbbbbbd", "7-8 f: qfsjhfln", "5-7 m: mmmmfmmm", "5-7 d: xmdgwbdvd", "7-9 t: tcttttntttt", "5-6 j: khhjjd", "10-11 l: llllflllllj", "9-12 z: zzzzzzzmzzzzxzz", "2-8 f: qvfnffff", "8-12 v: nvvvvvvczhfvvvvvkk", "8-10 x: xxtxxxxxxb", "2-3 r: xrrw", "4-14 q: nrszcbwqwzqjfqb", "2-4 v: vqvq", "4-5 l: llllml", "15-16 k: kkkkkkkkkkkkkkkg", "6-7 g: gggggggggg", "14-15 s: ssssssssssdsscs", "6-12 m: tsmmpmwfbwmmx", "1-7 l: jqsspll", "4-17 h: cprhghxcdvbvkkjfhdp", "11-12 z: zqzzzgzzzzqz", "4-5 x: bxpxx", "2-4 n: knknnfnptzqdqbc", "1-4 p: lppwp", "10-15 m: txlmhfqmzcldstmpjx", "4-6 w: jwjfcw", "7-9 q: zqdqqqmwqqqvj", "2-3 t: pttdkz", "5-9 b: hlbbbnbmbtxcbnnhbgrb", "4-6 d: dddddtldddrdnldd", "5-6 x: xqxxxzxxx", "4-6 n: ndnwjn", "9-17 f: ffxffdpqfhfffftfmff", "6-16 p: zmxqkgdwplcpnpmpcfr", "1-15 p: lnpmpvktfpppnppmckz", "5-13 n: lnnnnncnpnhntkknzcnn", "10-14 k: kkkkkkkkkpkkkskk", "4-5 p: ppppp", "13-18 n: nnnnnnnnnnnnnnnnnn", "4-5 g: fvsvsfhgpgngl", "1-2 v: fvcvp", "9-10 b: hbkgnddkbmk", "11-14 h: xhhhhhhmhhhzhf", "3-4 w: lgzw", "4-8 l: ldnmhsblcqgsxdqjzgr", "3-7 k: lskkkpzkk", "8-9 j: jjjjjjjdjjjjjjj", "7-13 r: rrxrprccwrhrrrlj", "5-8 z: bvzrzzvzczzzdp", "1-4 l: vlnll", "4-6 k: kktkwkgdxb", "1-2 n: qnhn", "8-10 j: jjjjrsjbrljmsjj", "10-12 h: pqhdkxhlchhg", "10-11 p: phppppppnpkrpwp", "1-6 k: tkkkkkkkkk", "4-6 f: fcfffwnjkffwfffffff", "5-8 h: qhghhhgjhhh", "1-4 g: zggggggtbgg", "4-6 k: kkwkkh", "1-4 g: hkgmtd", "5-7 c: cfhcckcl", "8-11 f: fffcfxrfffbtfffwf", "4-8 s: dssbsssnsss", "8-18 t: clwqmjvttmkgxfdpxt", "4-5 s: sscsjsc", "3-4 q: zqqx", "5-7 t: ftmttnxttz", "9-11 m: mmmmmmmmrmmmmmm", "9-14 m: hmkmmzmmlmvmmqmmmm", "2-3 z: zzzz", "4-5 m: mmmqp", "7-14 n: xnkknkntrjtlgn", "7-12 x: wrzfsmxxhtkxskdxxx", "10-12 j: jjjjjjjjjjjrj", "11-13 m: mmmmmmvmthmmz", "12-15 z: pzzszlncbpzzmjzzwmjz", "5-10 v: vvvvtvvvthv", "6-8 j: jjjjjfjqfj", "3-4 v: vkdvlv", "4-5 c: cccfccccc", "10-11 l: llklllllllll", "13-15 m: mmmmmmmmmnbmmmmmm", "2-4 w: jqvswww", "4-5 w: wwqwlmww", "8-9 b: fbkbbbbbb", "15-16 v: vvvvvvvvvvvvvvdnvv", "7-8 g: ggggggzh", "8-11 x: mxxxxxxfxxx", "1-2 f: fkff", "1-3 k: kgjk", "2-5 g: jgckspgbdfm", "2-8 g: mcsbglgqtfzgfgln", "7-11 t: tttttttttttttt", "2-7 h: hhvphvhhghhrh", "15-16 b: bbbbbbbbbbbbbbbb", "10-11 b: bbhswbbvbrbbhkbbbwb", "5-6 l: lbzhsrls", "3-5 f: bcbffdvfkf", "11-16 t: bztjnbvtkttktwttttt", "8-17 d: pdpswddddddhtdfkdd", "12-13 h: hhhznhqphxhhnhhhhs", "1-6 k: shhkqkhtd", "2-3 h: vhnj", "11-14 z: zzzzzzzzzzszzzzzzzzz", "5-7 v: vbvvpvv", "1-3 g: gvgsgb", "8-12 t: tlhfxnvgxkpt", "4-7 t: krnhttl", "16-17 t: tftttttttttqtttqhttb", "17-18 z: wczzzzzvzdzzkzzshgg", "12-20 p: pppppppppppwpppppppp", "13-14 z: zzzzzlzzzzzzslzb", "3-5 b: sfblqvzqgpkwq", "8-9 r: rrrrrrrzr", "3-10 h: fhkdhpslchccxx", "8-9 r: vrrrrjrvrprr", "2-4 r: rrxsgdhj", "11-12 s: ssssssstsslr", "4-8 q: pfqlqqplqtlfrh", "3-12 l: wflllcfllvlwlqktlll", "3-6 g: pmvvggggqgjg", "19-20 w: wwwwwwwwwwwwwwwwwhlv", "7-14 t: ttttlttttttttt", "3-11 b: jbbwbhzpbbg", "15-19 t: fbjvntgrrhdtbltzjkc", "3-4 b: cqbbb", "10-11 l: lllllllllts", "1-8 z: xzzzzzzxzzzzzzzz", "11-15 b: scbsrhqwjptfxfbjz", "5-8 q: qqkqqmqld", "12-17 b: bhbbbgsdbbbhncbzb", "2-7 k: kkkkbkktzgk", "7-14 m: mdmsmmgmmmmcmmmm", "16-18 b: zqzlllfbdfrkwrwrslb", "12-15 t: mzzztkqvcmvpdmtmft", "1-4 c: ncqcdc", "10-11 k: kkkkkkzkkkjkq", "4-7 w: wwwswww", "4-13 f: lnrcvxznlcfxtnfz", "1-2 r: rprr", "2-4 b: cbtxpjbbf", "6-12 j: jjcjjjhjhzjg", "16-17 x: xxxxxxzxxxmxxxxxxx", "7-8 l: kwllgltm", "1-6 c: cccckzcccl", "1-6 k: nkkkkk", "10-11 d: dddddgddjdddddddd", "7-11 d: dddddddrddn", "4-6 s: pshmskjsszcxw", "4-7 x: zwnmxmxxxxxxbxnx", "3-6 l: gbszlgm", "4-14 h: hphhhnhqhghhhh", "4-7 n: sbnnnwzkgzxvnnrn", "5-8 h: hhhhhhhhh", "11-13 j: jnjjjjqjjjvjjj", "7-9 d: dddddcwdd", "2-10 k: kmkkkkkkkd", "5-7 j: jpdcczgzjjjnhtjdhzc", "10-16 f: fffffffbfbftwjfj", "2-3 c: nncc", "1-7 z: dbzmkzzhrjrjgjkl", "4-5 v: qzwvr", "1-3 w: rwwnr", "1-4 f: hffmff", "5-6 w: wwwwtwww", "4-12 r: vtfbqqfrnmqk", "7-10 q: qqwqwqqqrc", "1-2 d: dndd", "5-10 c: rmrpcwcckcvf", "1-2 d: vdfnl", "2-11 j: jjjjjjjjjjvq", "8-11 k: kkbkxkjtkxzksk", "2-7 m: bcmxqdmcw", "2-4 d: rdtdddt", "11-12 p: zpppppzpxpvpzpp", "3-8 f: fgvbvrbflh", "10-11 b: bbfbbbbbbqdbbb", "3-4 d: lkdn", "6-7 b: bbbbsbbbr", "3-5 b: bbbbbb", "8-9 b: kbbbbbbbh", "1-6 q: zgbbkjwdwprjlzcqtxl", "5-12 p: ppppcpppppplp", "4-5 s: zfscs", "3-6 z: fszzcqrlwqtblhgzg", "1-3 l: nswlxp", "6-10 r: lkrrrxrnqzr", "10-11 l: lllllllllll", "5-6 x: xgrxpxxx", "2-3 n: lmwn", "5-6 d: bddnddsd", "1-8 x: xxxxxxxrx", "15-19 b: bbbbqbbbbbbbkbvbbbbb", "12-14 h: mhhhqphghhhfnhbhczr", "2-4 f: ffjfkk", "1-2 m: mpsx", "2-5 g: gpplg", "1-2 v: pvvv", "4-5 z: zzzbz", "8-13 q: qqkkgnqttwgqknqdj", "3-15 c: cmlfccwcbxcztzcx", "7-9 q: hcqqqqqqqqssm", "1-10 p: lppnpdpdll", "6-7 f: bxjpxffjbfzqhrccts", "4-5 j: cqljj", "4-5 s: srsjjss", "10-16 d: dcdddddbddhdzdcldddt", "2-9 c: vcqhwjctthq", "2-4 r: jvdbj", "3-4 h: shxnz", "1-2 c: ccccgcc", "3-5 l: flhlllklwllgf", "4-5 t: xqfctf", "1-9 m: mmmmmmmmmmmmmmm", "1-2 b: brbx", "10-16 x: jjlgdbxhxxhvvvqb", "2-3 s: spssss", "10-11 x: xxvxxxxxxxx", "2-15 x: qwbhmmbxwkflmqm", "16-17 s: sssssssssssssssts", "12-13 c: nxhfcctzkxgkcfcl", "15-16 w: wwwwwwwwwwwdwwww", "7-8 x: fmxlxtsmx", "12-15 w: wwcwwwwwwwswwwnwmwk", "10-11 m: xwkpzpvxgmm", "1-5 l: plvllrlvlcllnlqll", "2-3 m: prmrsns", "2-4 w: rwwh", "15-16 g: gggggnggggggfggng", "9-11 s: tlghtdpfmsc", "11-12 r: jttrrtcwkkdx", "3-10 m: bqqqmmfrlm", "1-8 v: nvdcvvjv", "17-19 l: lllllllllllllllllvl", "10-16 t: ttjtttkntttxtttktt", "8-14 h: hhhhhdhrhhhhhhhr", "2-8 f: ftfffffn", "5-13 q: qxqqqqsmqdqqd", "9-11 z: zzzzzjzbkzzz", "10-11 r: rrrrrrrrrhlr", "2-5 p: lpjqpkfhtdxm", "12-13 j: jjjjjjjjjjjkbjj", "6-12 l: zrghbwlcdxllq", "11-13 w: wwwwwwwwwwwwtcl", "2-6 v: jvvrvh", "5-9 p: pvmpzpmdpp", "2-9 k: kbkjkzkkxkfdkbf", "8-17 z: jmxcvbjjgmjzzwzbzzz", "6-8 k: kkklkkkjk", "6-11 n: qdnknnnnmncnt", "6-7 n: nnnnnjq", "3-4 v: gncvr", "8-9 q: wqkslqtqz", "1-5 k: ljdjkk", "6-7 w: kpzhwww", "5-7 r: rrrrrrr", "12-14 v: vvvvvvvvvvvvfm", "2-4 h: htfh", "4-14 t: qqgtbtdbftmmxtm", "2-5 p: pjwmp", "4-5 t: jjptqvpdm", "17-19 w: wwwwwwwwwwwwwwwwwwx", "10-11 g: mqdxmvggggg", "13-18 w: lwqfhxvvvspcwqmpmwb", "2-4 p: qxdr", "6-8 b: bxrrxkkxv", "1-4 h: mbmghhh", "5-9 f: ptmffcjqcnfhd", "4-10 d: bsbttdvdpl", "1-3 n: znxn", "1-5 q: qqtgq", "1-10 q: nqqqqqqqqbq", "3-4 r: rrtrm", "12-13 d: fdfgtrdbdbjdj", "8-9 c: ccccccczs", "3-5 d: nqgjdv", "10-11 q: qqqqqqqqqpq", "9-10 m: mkcmjtmspf", "5-7 q: jvpqjgq", "7-8 g: gggggggm", "5-7 r: brrtlpr", "11-13 c: wlcqccbcchvfc", "9-14 j: jmjgjjjjvrjrjjjjj", "3-8 n: nnmknncxnpxtbnn", "9-11 d: zdpddddvpbd", "3-4 t: qktttlnb", "4-7 f: fffmffjfgf", "2-5 l: llxlwkl", "2-6 b: qblblb", "2-5 d: vddcd", "5-6 w: wwwwwswwwwww", "3-6 s: hsjszsfsknsscv", "7-9 r: rrrrcrxrrr", "8-9 x: xntxnxxxwx", "10-13 k: ltkszmdqkkklqwbktrbq", "6-7 w: mdwxbwdg", "2-7 n: pcdhphd", "8-14 k: kchdwzkfrwskmksqckd", "1-6 q: qqqqqzqq", "7-10 z: zzzzzzdzzz", "1-4 c: ccgrfccc", "10-13 x: zxxqxxtxbnxxxxxx", "7-10 b: dbpbdlmwqpjwmtplxzw", "10-13 v: vvtmvvpvvxvksvbvvvv", "7-12 w: wwzcnwlswwrww", "16-17 v: lvtlzvvnhtvvhvkkl", "13-15 t: tttttttttwtttttt", "3-4 h: dlvx", "8-10 q: fmwqrqqkjq", "11-20 x: xhwxxxjxxwtxtvxxnxxx", "8-9 h: thqzhpdvkr", "18-20 v: crrlvhvvdmvgvrfvvxvb", "1-7 b: bbbbbbbbbbb", "4-5 m: tjmnmmsmp", "3-6 j: jsvxbj", "4-10 v: mwlvhrttwvn", "2-6 k: tgwhvrkt", "4-9 x: hpsnbxzxcns", "1-6 b: bbbbbbbbbbbbd", "3-16 z: fzxstkqfcsmzkcjzf", "5-9 g: hgzrgkvgh", "1-2 l: lnlb", "2-4 p: rrlpp", "1-6 k: ckkkkkkkkkkkkk", "11-16 j: jkjjjjjjwkdbjjjjjj", "2-5 k: ktqksk", "2-4 n: nhpbg", "5-10 g: qlqfgmrdjxdfhvvbgxrc", "9-18 x: xxxxxxxxgxxxxxxxxxpx", "11-18 m: hmlcpjmmtwnmjwsjsm", "4-7 b: gbrbgqbtx", "3-11 w: wwdwwwwwwwnw", "2-3 w: qhkqw", "1-3 z: zrvzzzzz", "4-15 s: lssbsssssssssscsssss", "1-5 f: wffff", "1-4 s: sssssssssss", "15-17 l: lllcllnlllllllxll", "4-5 h: hhthg", "2-4 f: fffff", "10-12 c: cccrwcccccckcc", "7-8 f: fffpffmgf", "1-11 w: wwwwwwwhwwt", "1-9 q: mhqhngqqvvqq", "17-19 v: vlthwqfvlfgjvbqdvpkk", "4-19 v: vvvzvvvvvvvvvqvvvvvz", "10-11 k: kkxkkkzkkkrkkk", "4-12 m: wjmmtmqmmmmmmmmmm", "3-14 g: ggggggggggggggg", "6-7 w: wwwwwwww", "4-5 c: clqtstsbfflngcfhgc", "1-11 l: zljlllllxljll", "3-7 x: xrtxxft", "6-8 k: lkkmpkvkkk", "1-9 f: glfffffffffffffffff", "3-9 r: rrrrrrrrnr", "9-10 r: rrrkrtgrrrrrrr", "3-9 h: rvvxhnhmht", "10-12 q: qpwqqjqqvqrnqqv", "5-8 d: ddxddddlddd", "1-7 p: lkppppnppkppp", "1-4 d: mvsdd", "6-7 m: zsmmmmhmmm", "4-7 w: bwlzdglxrsgt", "2-7 g: lgggtzdbvggqgjcggrq", "3-4 r: rrtrj", "7-12 l: lllllllllmlqlll", "8-9 q: kvtnbfqqzl", "8-9 h: qfkhhhrvh", "3-4 c: cccjcccccccccc", "4-5 v: dpmvwdpk", "17-20 w: wwwwwwwwwwwwwwwwwwww", "3-16 v: vvvcsfkvmchbbnvxvhzd", "5-14 z: bvhrtqkhnwljrzmbvz", "10-11 j: jjjjjjjjjpzj", "12-14 w: wqwgwwwwwwbdws", "1-3 s: dbntscqz", "15-18 t: tttttgttttdtttmttt", "1-3 l: llldhlnxrr", "5-6 c: qcccqhccczccc", "10-14 b: bbbvblvbpndqbbbqnbbb", "1-2 c: pccchcc", "2-7 x: fxsxbmksgjpwspp", "4-5 x: wbbxbndlbbls", "6-8 f: tfnwfwfsmf", "3-9 q: qqqqvsqqkqq", "6-17 h: chwghhrhlhhnbsncwc", "3-6 w: wvwwkw", "14-15 q: qqqqqqzqqqqqqfd", "10-16 q: qzjqrvgwdqjqklqk", "2-3 h: lxghjh", "15-17 f: fvdgfffffffxzflmf", "13-15 f: ffffffffffffbftffffr", "11-12 g: jgqgbglrgbgfgw", "8-9 d: hddddddpd", "13-14 p: pppppppppppptx", "4-5 w: rwpwwtwwc", "8-9 r: rrgrrrrrrrrr", "7-8 h: hhhhhhhbqf", "12-13 l: llllllllllllll", "3-4 n: nnntnn", "3-8 c: ccccctcccc", "6-7 x: xxgxxnkxfxxxxxfxxxxn", "6-7 q: qqzqtzcqs", "8-12 t: tttttttttttptt", "2-4 q: qxql", "3-4 v: vvxxv", "8-11 t: tttttttcttm"]
valid = 0
for x in iinput:
password = x.split(":")[1].strip()
rule = x.split(":")[0].split(" ")
if (rule[1] == password[int(rule[0].split("-")[0])-1] or rule[1] == password[int(rule[0].split("-")[1])-1]) and password[int(rule[0].split("-")[0])-1] != password[int(rule[0].split("-")[1])-1]:
valid += 1
print(valid)