import re s = input()k = input()print(re.findall("((?P<ch>[a-z])(?P=ch){"+k+"})", s) != list()) new_s = ''.join(re.findall("(?P<ch>[a-z])(?P=ch)*", s))print(new_s)
hhiiiiiiiiihhhhhhhhiiiiiiiii 5
True hihi
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!