While testing everything works but my Solution is wrong. This task requirements are not clear for me. I am searching for first pattern and if program will find it, it is printed out and whole program is stopped