2018 WUSTACM 新生交流群:829055498

Problem 1380. -- 娶啊娶啊娶公主

1380: 娶啊娶啊娶公主

Time Limit: 2 Sec  Memory Limit: 50 MB   64bit IO Format: %lld
Submitted: 28  Accepted: 9
[Submit][Status][Web Board]


Gongzhu want to pick herself's boyfriend  by Programming Contest.(Well this is for the sake of the baby).Gongzhu give a number Q,and she asks all of boys

to  find  the minimal natural number N, so that N! contains exactly Q zeroes on the trail in decimal notation. As you know N! = 1*2*...*N. For example, 5! = 120, 120 contains one zero on the trail.


She will marry that person to give the correct answer within 2000MS !

As you love Gongzhu very much ! you want to have a try,Now, you need to solve this problem by programming!!!


Input starts with an integer T (≤ 1000), denoting the number of test cases.


Each case contains an integer Q (1 ≤ Q ≤ 1000) in a line.


For each case, print the case number and N. If no solution is found then print 'impossible'

Sample Input


Sample Output

Case 1: 5
Case 2: 10
Case 3: impossible


Be carefully!


[Submit][Status][Web Board]