{"body":"my @pokemons = <bagon audino baltoy banette bidoof braviary bronzor carracosta charmeleon cresselia croagunk darmanitan deino emboar emolga exeggcute gabite girafarig gulpin haxorus heatmor heatran ivysaur jellicent jumpluff kangaskhan kricketune landorus ledyba loudred lumineon lunatone machamp magnezone mamoswine nosepass petilil pidgeotto pikachu pinsir poliwrath poochyena porygon2 porygonz registeel relicanth remoraid rufflet sableye scolipede scrafty seaking sealeo silcoon simisear snivy snorlax spoink starly tirtouga trapinch treecko tyrogue vigoroth vulpix wailord wartortle whismur wingull yamask>;\n\nmy %start = @pokemons.classify: *.substr: 0, 1;\n\nmulti get-sequence(%s, Str:D $f) {\n    return Empty without %s{$f};\n    do if %s{$f} -> @a {\n        my @h = @a.grep: { %s{.substr: *-1, 1} };\n        return Empty unless @h;\n        await do for @h -> $w {\n            start {\n                my %ns = %( |%s, |($f => @a.grep: * ne $w unless @a == 1) );\n                ($w, |samewith %ns, $w.substr: *-1, 1)\n            }\n        }.max: *.elems\n    }\n}\n\nsay await(%start.keys.map({ start get-sequence %start, $_ })).max: *.elems\n","name":"","extension":"txt","url":"https://www.irccloud.com/pastebin/3FRW8JEo","modified":1568150469,"id":"3FRW8JEo","size":1143,"lines":19,"own_paste":false,"theme":"","date":1568150469}