CF913G Power Substring

Description

You are given $ n $ positive integers $ a_{1},a_{2},...,a_{n} $ . For every $ a_{i} $ you need to find a positive integer $ k_{i} $ such that the decimal notation of $ 2^{k_{i}} $ contains the decimal notation of $ a_{i} $ as a substring among its last $ min(100,length(2^{k_{i}})) $ digits. Here $ length(m) $ is the length of the decimal notation of $ m $ . Note that you don't have to minimize $ k_{i} $ . The decimal notations in this problem do not contain leading zeros.

Input Format

The first line contains a single integer $ n $ ( $ 1

Output Format

Print $ n $ lines. The $ i $ -th of them should contain a positive integer $ k_{i} $ such that the last $ min(100,length(2^{k_{i}})) $ digits of $ 2^{k_{i}} $ contain the decimal notation of $ a_{i} $ as a substring. Integers $ k_{i} $ must satisfy $ 1