The flower
题号:NC200592
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Every problem maker has a flower in their heart out of love for ACM. As a famous problem maker, hery also has a flower.
Hery define string T as flower-string if T appears more than twice in string S and |T| = k. Hery wants you to find how many flower-string in S.

输入描述:

The first line contains a string S consist of ’f’, ’l’, ’o’, ’w’, ’e’, ’r’ and an integer k.


输出描述:

Output an integer m in the first line, the number of flower − string in S.
Next m lines, each line contains a flower-string and the lexicographical order of them should be from small to large
示例1

输入

复制
flowerflowerflower 3

输出

复制
4
flo
low
owe
wer