beecrowd | 2049

# Numbers of Ahmoc

By IX Maratona de Programação IME-USP, 2005 Brazil

Timelimit: 1

Before the Hispanic colonization and then the English one, the region of San Antonio was dominated by Indians ahmoc-axhozupeck, ancestors of the Sioux and Apaches. Ethnicity was completely destroyed by the colonists in the eighteenth century, making impossible the task of deciphering their large panels.

The Department of Archaeology at Baylor University devotes much of his research to the panels of Ahmoc Indians. Surprisingly the Indians already knew the Hindu numerals, but they did not use it for calculations (after all trade in that civilization did not exist). Baylor archaeologists suspect that the panels full of numbers were merely decorative. Also suspect that some patterns that recurred were signatures of the artists in order to ensure the authenticity of the panel.

Your task in this problem is to see if the panels are true, ie, if, indeed, contain the signature of the artist that the archaeologist suspected to be the author.

## Input

Several test instances are given. Each instance starts with a positive integer 0 ≤ a ≤ 1000000 which is the signature of the artist. The integer 0 indicates the end of data. The next line is the sequence number of the panel, which can be up to 300000 digits.

## Output

For each solved instance, you should print "Instance h" where h is an integer, and increasing sequential number starting from 1. On the next line, you should print "verdadeiro" (true) if the sequence of numbers contains the signature of the artist or "falsa" (false) if otherwise. A blank line should separate the output of each instance.

 Sample Input Sample Output 1234 837384937292379450545045672392303485065402302373543504864694450034302 23034 837384937292379450545045672392303485065402302373543504864694450034302 0 Instancia 1 falsa Instancia 2 verdadeira