SP23861 FINGP - Fingerprints

Description

professor Emad Eldin one of the best people in pattern recognation , he asked his students to create a program to check if a spicial pattern belongs to fingerprints of someone or not.

Input Format

The first line of the input contains special pattern string S(1 S| . second line will be a single integer N, the number of fingerprints (1 (1 F| .

Output Format

For each test case, print an integer K, the number of fingerprints strings that spicial pattern string belongs to it. Followed by K lines, each contains the fingerprint string that the special pattern string belongs to it. You should print the fingerprint strings in a lexicographical order. If there is no fingerprint belongs to the special pattern , print "Wrong fingerprints!" instead. ### Examples ```
Input:
On
5
Pattern recognatiOn
CommOn patterN
game
organizatiOn
lion


Output:

2 Pattern recognatiOn organizatiOn
``` ```
Input:
Ze

2 Fingerprint pattern design

Output: Wrong fingerprints!
``` Notes \- String _S_ contains upper-case English letters ('A' - 'Z') and lower-case English letters ('a' - 'z') only. \- All other strings in the input contains upper-case English letters ('A' - 'Z'), lower-case English letters ('a' - 'z') and spaces (' ') only. \- All strings are case sensitive ('A' is not equal to 'a'). -Lexicographical order is defined in following way. When we compare s and t, first we find the leftmost position with differing characters: si ≠ ti. If there is no such position (i. e. s is a prefix of t or vice versa) the shortest string is less. Otherwise, we compare characters si and ti according to their order in alphabet.